aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/myricom/myri10ge
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-06-27 13:44:26 +0200
committerDavid S. Miller <davem@davemloft.net>2013-06-28 22:09:27 -0700
commit3b233fe0435518169af03027aedc83d42eb28ac4 (patch)
tree9306d51813bf8f2c3d83ce7cbc6b9455481d595f /drivers/net/ethernet/myricom/myri10ge
parentdrivers: net: cpsw: add newline after MACID log (diff)
downloadlinux-dev-3b233fe0435518169af03027aedc83d42eb28ac4.tar.xz
linux-dev-3b233fe0435518169af03027aedc83d42eb28ac4.zip
nlmon: fix comparison in nlmon_is_valid_mtu
This patch fixes the following warning introduced in e4fc408e0e99 ("packet: nlmon: virtual netlink monitoring device for packet sockets") reported by Dan Carpenter: warning: "drivers/net/nlmon.c:31 nlmon_is_valid_mtu() warn: always true condition '(new_mtu <= ((~0 >> 1))) => (s32min-s32max <= s32max)'" Thus, we should simply remove the test against INT_MAX. Next to that we also need to explicitly cast the sizeof() case as the comparison is type promoted to unsigned long so negative values are then valid instead of invalid. While at it, this also adds a comment about Netlink and MTUs. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/myricom/myri10ge')
0 files changed, 0 insertions, 0 deletions