From: Simon Horman <horms@kernel.org>
To: Jacek Kowalski <jacek@jacekk.info>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] e1000e: ignore factory-default checksum value on TGP platform
Date: Tue, 24 Jun 2025 17:03:04 +0100 [thread overview]
Message-ID: <20250624160304.GB5265@horms.kernel.org> (raw)
In-Reply-To: <cca5cdd3-79b3-483d-9967-8a134dd23219@jacekk.info>
On Tue, Jun 24, 2025 at 02:51:09PM +0200, Jacek Kowalski wrote:
> > > + if (hw->mac.type == e1000_pch_tgp && checksum == (u16)NVM_SUM_FACTORY_DEFAULT) {
> >
> > I see that a similar cast is applied to NVM_SUM. But why?
> > If it's not necessary then I would advocate dropping it.
>
> It's like that since the beginning of git history, tracing back to e1000:
>
> $ git show 1da177e4c3f4:drivers/net/e1000/e1000_hw.c | grep -A 1 EEPROM_SUM
> if(checksum == (uint16_t) EEPROM_SUM)
> return E1000_SUCCESS;
> (...)
>
>
> I'd really prefer to keep it as-is here for a moment, since similar
> constructs are not only here, and then clean them up separately.
>
> Examples instances from drivers/net/ethernet/intel:
>
> e1000/e1000_ethtool.c: if ((checksum != (u16)EEPROM_SUM) && !(*data))
> e1000/e1000_hw.c: if (checksum == (u16)EEPROM_SUM)
> e1000e/ethtool.c: if ((checksum != (u16)NVM_SUM) && !(*data))
> igb/e1000_82575.c: if (checksum != (u16) NVM_SUM) {
> igb/e1000_nvm.c: if (checksum != (u16) NVM_SUM) {
> igc/igc_nvm.c: if (checksum != (u16)NVM_SUM) {
Ok. But can we look into cleaning this up as a follow-up?
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-06-24 16:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 15:58 [PATCH v2 1/2] e1000e: disregard NVM checksum on tgp when valid checksum mask is not set Jacek Kowalski
2025-06-23 16:01 ` [PATCH v2 2/2] e1000e: ignore factory-default checksum value on TGP platform Jacek Kowalski
2025-06-23 16:18 ` Jacek Kowalski
2025-06-24 18:17 ` Vlad URSU
2025-06-24 18:34 ` Jacek Kowalski
2025-06-24 18:54 ` Vlad URSU
2025-06-24 9:53 ` Simon Horman
2025-06-24 12:51 ` Jacek Kowalski
2025-06-24 16:03 ` Simon Horman [this message]
2025-06-24 16:08 ` Jacek Kowalski
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=20250624160304.GB5265@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacek@jacekk.info \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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