Re: [PATCH net-next] r8169: fix ntohs/htons sparse warnings

2019-07-01 Thread Al Viro
On Mon, Jul 01, 2019 at 10:46:49PM +0100, Al Viro wrote: > already done cpu_to_le32 to the containing 32bit word. So the le32_to_cpu, sorry

Re: [PATCH net-next] r8169: fix ntohs/htons sparse warnings

2019-07-01 Thread Al Viro
On Mon, Jul 01, 2019 at 10:13:56PM +0100, Al Viro wrote: > On Mon, Jul 01, 2019 at 10:36:26PM +0200, Heiner Kallweit wrote: > > > > The code dealing with the value passed to __vlan_hwaccel_put_tag() as the > > > third argument treats it as a host-endian integer. So... Has anyone > > > tested that

Re: [PATCH net-next] r8169: fix ntohs/htons sparse warnings

2019-07-01 Thread Al Viro
On Mon, Jul 01, 2019 at 10:36:26PM +0200, Heiner Kallweit wrote: > > The code dealing with the value passed to __vlan_hwaccel_put_tag() as the > > third argument treats it as a host-endian integer. So... Has anyone > > tested that code on b-e host? Should that ntohs() actually be swab16(), > > y

Re: [PATCH net-next] r8169: fix ntohs/htons sparse warnings

2019-07-01 Thread Heiner Kallweit
On 01.07.2019 21:56, Al Viro wrote: > On Mon, Jul 01, 2019 at 09:35:28PM +0200, Heiner Kallweit wrote: >> Sparse complains about casting to/from restricted __be16. Fix this. > > Fix what, exactly? Force-cast is not a fix - it's "STFU, I know > better, it's really correct" to sparse. Which may or

Re: [PATCH net-next] r8169: fix ntohs/htons sparse warnings

2019-07-01 Thread Al Viro
On Mon, Jul 01, 2019 at 09:35:28PM +0200, Heiner Kallweit wrote: > Sparse complains about casting to/from restricted __be16. Fix this. Fix what, exactly? Force-cast is not a fix - it's "STFU, I know better, it's really correct" to sparse. Which may or may not match the reality, but it definitely

[PATCH net-next] r8169: fix ntohs/htons sparse warnings

2019-07-01 Thread Heiner Kallweit
Sparse complains about casting to/from restricted __be16. Fix this. Fixes: 759d09574172 ("r8169: improve handling VLAN tag") Reported-by: kbuild test robot Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif