Re: [PATCH NET] ethtool: silence warning on bit loss

2016-10-14 Thread David Miller
From: Jesse Brandeburg Date: Thu, 13 Oct 2016 16:13:55 -0700 > Sparse was complaining when we went to prototype some code > using ethtool_cmd_speed_set and SPEED_10, which uses > the upper 16 bits of __u32 speed for the first time. > > CHECK > ... > .../uapi/linux/ethtool.h:123:28: warning:

RE: [PATCH NET] ethtool: silence warning on bit loss

2016-10-14 Thread David Laight
From: Jesse Brandeburg > Sent: 14 October 2016 00:14 > Sparse was complaining when we went to prototype some code > using ethtool_cmd_speed_set and SPEED_10, which uses > the upper 16 bits of __u32 speed for the first time. ... > Reported-by: Preethi Banala > Signed-off-by: Jesse Brandeburg >

[PATCH NET] ethtool: silence warning on bit loss

2016-10-13 Thread Jesse Brandeburg
Sparse was complaining when we went to prototype some code using ethtool_cmd_speed_set and SPEED_10, 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 i