From: Jakub Kicinski <kuba@kernel.org>
To: Min-Hua Chen <minhuadotchen@gmail.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Simon Horman <simon.horman@corigine.com>,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] net: stmmac: compare p->des0 and p->des1 with __le32 type values
Date: Fri, 19 May 2023 15:27:15 -0700 [thread overview]
Message-ID: <20230519152715.7d1c3a49@kernel.org> (raw)
In-Reply-To: <20230519115030.74493-1-minhuadotchen@gmail.com>
On Fri, 19 May 2023 19:50:28 +0800 Min-Hua Chen wrote:
> - if ((p->des0 == 0xffffffff) && (p->des1 == 0xffffffff))
> + if (p->des0 == cpu_to_le32(0xffffffff) &&
> + p->des1 == cpu_to_le32(0xffffffff))
Can you try to fix the sparse tool instead? I believe it already
ignores such errors for the constant of 0, maybe it can be taught
to ignore all "isomorphic" values?
By "isomorphic" I mean that 0xffffffff == cpu_to_le32(0xffffffff)
so there's no point complaining.
--
pw-bot: reject
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <kuba@kernel.org>
To: Min-Hua Chen <minhuadotchen@gmail.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Simon Horman <simon.horman@corigine.com>,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] net: stmmac: compare p->des0 and p->des1 with __le32 type values
Date: Fri, 19 May 2023 15:27:15 -0700 [thread overview]
Message-ID: <20230519152715.7d1c3a49@kernel.org> (raw)
In-Reply-To: <20230519115030.74493-1-minhuadotchen@gmail.com>
On Fri, 19 May 2023 19:50:28 +0800 Min-Hua Chen wrote:
> - if ((p->des0 == 0xffffffff) && (p->des1 == 0xffffffff))
> + if (p->des0 == cpu_to_le32(0xffffffff) &&
> + p->des1 == cpu_to_le32(0xffffffff))
Can you try to fix the sparse tool instead? I believe it already
ignores such errors for the constant of 0, maybe it can be taught
to ignore all "isomorphic" values?
By "isomorphic" I mean that 0xffffffff == cpu_to_le32(0xffffffff)
so there's no point complaining.
--
pw-bot: reject
next prev parent reply other threads:[~2023-05-19 22:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 11:50 [PATCH v3] net: stmmac: compare p->des0 and p->des1 with __le32 type values Min-Hua Chen
2023-05-19 11:50 ` Min-Hua Chen
2023-05-19 13:17 ` Simon Horman
2023-05-19 13:17 ` Simon Horman
2023-05-19 22:27 ` Jakub Kicinski [this message]
2023-05-19 22:27 ` Jakub Kicinski
2023-05-20 1:55 ` Min-Hua Chen
2023-05-20 1:55 ` Min-Hua Chen
2023-05-20 4:04 ` Jakub Kicinski
2023-05-20 4:04 ` Jakub Kicinski
2023-05-20 7:34 ` Min-Hua Chen
2023-05-20 7:34 ` Min-Hua Chen
2023-05-22 14:09 ` Edward Cree
2023-05-22 14:09 ` Edward Cree
2023-05-22 15:36 ` Min-Hua Chen
2023-05-22 15:36 ` Min-Hua Chen
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=20230519152715.7d1c3a49@kernel.org \
--to=kuba@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=minhuadotchen@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peppe.cavallaro@st.com \
--cc=simon.horman@corigine.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.