summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2017-09-21 22:33:29 +0200
committerDavid S. Miller <davem@davemloft.net>2017-09-23 06:25:52 +0200
commit52a59bd509e3dc458be99dcf333b778e6e3b3749 (patch)
tree280d07c8604dcf9f7f93ccd649cbcb58ae1a7058 /net/core
parentnet: Remove useless function skb_header_release (diff)
downloadlinux-52a59bd509e3dc458be99dcf333b778e6e3b3749.tar.xz
linux-52a59bd509e3dc458be99dcf333b778e6e3b3749.zip
net: use 32-bit arithmetic while allocating net device
Private part of allocation is never big enough to warrant size_t. Space savings: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10) function old new delta alloc_netdev_mqs 1120 1110 -10 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index fb766d906148..37d6a3c59e69 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -7989,7 +7989,7 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
unsigned int txqs, unsigned int rxqs)
{
struct net_device *dev;
- size_t alloc_size;
+ unsigned int alloc_size;
struct net_device *p;
BUG_ON(strlen(name) >= sizeof(dev->name));