]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: avoid signed-unsigned comparison in ethtool_validate_speed()
authorMichael Zhivich <mzhivich@akamai.com>
Mon, 8 Apr 2019 14:48:45 +0000 (10:48 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2019 23:30:43 +0000 (16:30 -0700)
commitc328adce05fc92896a1643e64b466518e126e43a
tree2163e312bce8d9f0288132da3c97ecf679fe6d24
parent379e0dd5797a38818387f70f591b571ee7e4b2fc
ethtool: avoid signed-unsigned comparison in ethtool_validate_speed()

When building C++ userspace code that includes ethtool.h
with "-Werror -Wall", g++ complains about signed-unsigned comparison in
ethtool_validate_speed() due to definition of SPEED_UNKNOWN as -1.

Explicitly cast SPEED_UNKNOWN to __u32 to match type of
ethtool_validate_speed() argument.

Signed-off-by: Michael Zhivich <mzhivich@akamai.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/ethtool.h