]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: silence warning on bit loss
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Thu, 13 Oct 2016 23:13:55 +0000 (16:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Oct 2016 20:05:42 +0000 (16:05 -0400)
commitea2c1ea9e1d26cabbcd63794eee65599d9cf4e29
tree97d6f017863272b5f2e8c84129a8c55f31c8c03c
parentf425f64f386ac0745f2389d3e10c3edd00e594ff
ethtool: silence warning on bit loss

Sparse was complaining when we went to prototype some code
using ethtool_cmd_speed_set and SPEED_100000, which uses
the upper 16 bits of __u32 speed for the first time.

CHECK
...
.../uapi/linux/ethtool.h:123:28: warning:
  cast truncates bits from constant value (186a0 becomes 86a0)

The warning is actually bogus, as no bits are really lost, but
we can get rid of the sparse warning with this one small change.

Reported-by: Preethi Banala <preethi.banala@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/ethtool.h