From: Ursula Braun <ubraun@linux.vnet.ibm.com>
To: David Laight <David.Laight@ACULAB.COM>,
"davem@davemloft.net" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
"jwi@linux.vnet.ibm.com" <jwi@linux.vnet.ibm.com>,
"schwidefsky@de.ibm.com" <schwidefsky@de.ibm.com>,
"heiko.carstens@de.ibm.com" <heiko.carstens@de.ibm.com>,
"raspl@linux.vnet.ibm.com" <raspl@linux.vnet.ibm.com>,
Hans Wippel <hwippel@linux.vnet.ibm.com>
Subject: Re: [PATCH net-next 5/7] s390/qeth: improve endianness handling
Date: Tue, 11 Apr 2017 12:20:28 +0200 [thread overview]
Message-ID: <aa0d0b73-ea21-743c-d2ce-451920eabd0c@linux.vnet.ibm.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DCFFCAB25@AcuExch.aculab.com>
On 04/10/2017 05:22 PM, David Laight wrote:
> From: Ursula Braun
>> Sent: 07 April 2017 13:33
>> On 04/07/2017 01:25 PM, David Laight wrote:
>>> From: Ursula Braun
>>>> Sent: 05 April 2017 09:40
>>>> From: Hans Wippel <hwippel@linux.vnet.ibm.com>
>>>>
>>>> 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.
>>>>
>>>> Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com>
>>>> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
>>>> ---
>>>> drivers/s390/net/qeth_core.h | 4 ++--
>>>> drivers/s390/net/qeth_core_main.c | 11 +++++-----
>>>> drivers/s390/net/qeth_l3_main.c | 46 +++++++++++++++++++--------------------
>>>> drivers/s390/net/qeth_l3_sys.c | 4 ++--
>>>> 4 files changed, 33 insertions(+), 32 deletions(-)
>>>>
>>>> diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
>>>> index 22aa2cd..6764ab9 100644
>>>> --- a/drivers/s390/net/qeth_core.h
>>>> +++ b/drivers/s390/net/qeth_core.h
>>>> @@ -844,9 +844,9 @@ static inline int qeth_get_ip_version(struct sk_buff *skb)
>>>> {
>>>> __be16 *p = &((struct ethhdr *)skb->data)->h_proto;
>>>>
>>>> - if (*p == ETH_P_8021Q)
>>>> + if (be16_to_cpu(*p) == ETH_P_8021Q)
>>>> p += 2;
>>>> - switch (*p) {
>>>> + switch (be16_to_cpu(*p)) {
>>>> case ETH_P_IPV6:
>>>
>>> These are definitely 'functional changes' on LE systems.
>> s390 is Big Endian; thus the change is basicly a NOP.
>
>> The only purpose of this kind of patches is getting rid
>> of sparse warnings with our code.
>
> Then say so in the commit message....
Understood, in future we will try to improve our commit message.
>
> What you are really doing is fixing the code in case anyone tries
> to use it on a LE system.
>
> David
>
next prev parent reply other threads:[~2017-04-11 10:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-05 8:40 [PATCH net-next 0/7] s390 patches for net-next Ursula Braun
2017-04-05 8:40 ` [PATCH net-next 1/7] s390/qeth: use QDIO_*_QFMT defines Ursula Braun
2017-04-05 8:40 ` [PATCH net-next 2/7] s390/qeth: fix up ssqd tracing Ursula Braun
2017-04-05 8:40 ` [PATCH net-next 3/7] s390/qeth: remove unused return value Ursula Braun
2017-04-05 8:40 ` [PATCH net-next 4/7] s390/qeth: Remove unused code Ursula Braun
2017-04-05 8:40 ` [PATCH net-next 5/7] s390/qeth: improve endianness handling Ursula Braun
2017-04-07 11:25 ` David Laight
2017-04-07 12:33 ` Ursula Braun
2017-04-10 15:22 ` David Laight
2017-04-11 10:20 ` Ursula Braun [this message]
2017-04-05 8:40 ` [PATCH net-next 6/7] s390/ctcm: " Ursula Braun
2017-04-05 8:40 ` [PATCH net-next 7/7] s390/netiucv: " Ursula Braun
2017-04-06 19:52 ` [PATCH net-next 0/7] s390 patches for net-next David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aa0d0b73-ea21-743c-d2ce-451920eabd0c@linux.vnet.ibm.com \
--to=ubraun@linux.vnet.ibm.com \
--cc=David.Laight@ACULAB.COM \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=hwippel@linux.vnet.ibm.com \
--cc=jwi@linux.vnet.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raspl@linux.vnet.ibm.com \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).