[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <509925af-3664-b9ff-7ae7-c668428b77cc@linux.vnet.ibm.com>
Date: Tue, 11 Apr 2017 12:28:50 +0200
From: Ursula Braun <ubraun@...ux.vnet.ibm.com>
To: David Laight <David.Laight@...LAB.COM>,
"davem@...emloft.net" <davem@...emloft.net>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
"jwi@...ux.vnet.ibm.com" <jwi@...ux.vnet.ibm.com>,
"schwidefsky@...ibm.com" <schwidefsky@...ibm.com>,
"heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
"raspl@...ux.vnet.ibm.com" <raspl@...ux.vnet.ibm.com>
Subject: Re: [PATCH net-next V2 5/7] s390/qeth: improve endianness handling
On 04/10/2017 05:16 PM, David Laight wrote:
> From: Ursula Braun
>> Sent: 07 April 2017 08:16
>> Avoid endianness warnings reported by sparse by (1) using endianness
>> conversions for assigning and using network packet fields, and (2)
>> removing unnecessary endianness conversions from qeth_l3_rebuild_skb. No
>> functional changes.
> ...
>> - if (*p == ETH_P_8021Q)
>> + if (be16_to_cpu(*p) == ETH_P_8021Q)
> ...
>
> This is clearly different on little-endian systems.
> Also (probably) better written as:
>
> if (*p == cpu_to_be16(ETH_P_8021Q))
>
> so that the constant can by byteswapped.
>
> David
>
Thanks, we will keep that in mind for future patches.
>
>
Powered by blists - more mailing lists