Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: net_device flags is an unsigned int

commit b00055aacdb ([NET] core: add RFC2863 operstate) changed
net_device flags from unsigned short to unsigned int.

Some core functions still assume its an unsigned short.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
b536db93 ea1f51be

+7 -7
+7 -7
net/core/dev.c
··· 4459 4459 4460 4460 static int __dev_set_promiscuity(struct net_device *dev, int inc) 4461 4461 { 4462 - unsigned short old_flags = dev->flags; 4462 + unsigned int old_flags = dev->flags; 4463 4463 uid_t uid; 4464 4464 gid_t gid; 4465 4465 ··· 4516 4516 */ 4517 4517 int dev_set_promiscuity(struct net_device *dev, int inc) 4518 4518 { 4519 - unsigned short old_flags = dev->flags; 4519 + unsigned int old_flags = dev->flags; 4520 4520 int err; 4521 4521 4522 4522 err = __dev_set_promiscuity(dev, inc); ··· 4543 4543 4544 4544 int dev_set_allmulti(struct net_device *dev, int inc) 4545 4545 { 4546 - unsigned short old_flags = dev->flags; 4546 + unsigned int old_flags = dev->flags; 4547 4547 4548 4548 ASSERT_RTNL(); 4549 4549 ··· 4646 4646 4647 4647 int __dev_change_flags(struct net_device *dev, unsigned int flags) 4648 4648 { 4649 - int old_flags = dev->flags; 4649 + unsigned int old_flags = dev->flags; 4650 4650 int ret; 4651 4651 4652 4652 ASSERT_RTNL(); ··· 4729 4729 * Change settings on device based state flags. The flags are 4730 4730 * in the userspace exported format. 4731 4731 */ 4732 - int dev_change_flags(struct net_device *dev, unsigned flags) 4732 + int dev_change_flags(struct net_device *dev, unsigned int flags) 4733 4733 { 4734 - int ret, changes; 4735 - int old_flags = dev->flags; 4734 + int ret; 4735 + unsigned int changes, old_flags = dev->flags; 4736 4736 4737 4737 ret = __dev_change_flags(dev, flags); 4738 4738 if (ret < 0)