From ff18374a9175e6b782be0257d62bbd77872c602e Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Fri, 20 Jul 2007 19:45:45 -0700 Subject: [PATCH] --- yaml --- r: 62464 b: refs/heads/master c: 31ce72a6b1c7635259cf522459539c0611f2c50c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/netdevice.h | 2 +- trunk/net/core/dev.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 351027845518..1f1172381681 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fc7b93800b48324667e218a4b6b784b853cf4dd7 +refs/heads/master: 31ce72a6b1c7635259cf522459539c0611f2c50c diff --git a/trunk/include/linux/netdevice.h b/trunk/include/linux/netdevice.h index 9820ca1e45e2..4a616d73cc25 100644 --- a/trunk/include/linux/netdevice.h +++ b/trunk/include/linux/netdevice.h @@ -575,7 +575,7 @@ struct net_device /* The TX queue control structures */ unsigned int egress_subqueue_count; - struct net_device_subqueue egress_subqueue[0]; + struct net_device_subqueue egress_subqueue[1]; }; #define to_net_dev(d) container_of(d, struct net_device, dev) diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c index 38212c3f9971..ee4035571c21 100644 --- a/trunk/net/core/dev.c +++ b/trunk/net/core/dev.c @@ -3624,7 +3624,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, /* ensure 32-byte alignment of both the device and private area */ alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST + - (sizeof(struct net_device_subqueue) * queue_count)) & + (sizeof(struct net_device_subqueue) * (queue_count - 1))) & ~NETDEV_ALIGN_CONST; alloc_size += sizeof_priv + NETDEV_ALIGN_CONST; @@ -3642,7 +3642,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, dev->priv = ((char *)dev + ((sizeof(struct net_device) + (sizeof(struct net_device_subqueue) * - queue_count) + NETDEV_ALIGN_CONST) + (queue_count - 1)) + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST)); }