summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2017-09-21 23:33:29 +0300
committerDavid S. Miller <davem@davemloft.net>2017-09-22 21:25:52 -0700
commit52a59bd509e3dc458be99dcf333b778e6e3b3749 (patch)
tree280d07c8604dcf9f7f93ccd649cbcb58ae1a7058 /net
parent242c1a28eb61cb34974e8aa05235d84355940a8a (diff)
downloadlinux-52a59bd509e3dc458be99dcf333b778e6e3b3749.tar.bz2
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')
-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));