All of lore.kernel.org
 help / color / mirror / Atom feed
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: [Intel-wired-lan] [PATCH 1/4] e1000: drop checksum constant cast to u16 in comparisons
Date: Wed, 25 Jun 2025 13:18:28 +0100	[thread overview]
Message-ID: <20250625121828.GB1562@horms.kernel.org> (raw)
In-Reply-To: <46b2b70d-bf53-4b0a-a9f3-dfd8493295b9@jacekk.info>

On Tue, Jun 24, 2025 at 09:29:43PM +0200, Jacek Kowalski wrote:

Hi Jacek,

Thanks for the patchset.

Some feedback at a high level:

1. It's normal for patch-sets, to have a cover letter.
   That provides a handy place for high level comments,
   perhaps ironically, such as this one.

2. Please provide some text in the patch description.
   I know these changes are trivial. But we'd like to have something there.
   E.g.

   Remove unnecessary cast of constants to u16,
   allowing the C type system to do it's thing.

   No behavioural change intended.
   Compile tested only.

3. This patchset should probably be targeted at iwl-next, like this:

	Subject: [PATCH iwl-next] ...

4. Please make sure the patchset applies cleanly to it's target tree.
   It seems that in it's current form the patchset doesn't
   apply to iwl-next or net-next.

5. It's up to you. But in general there is no need
   to CC linux-kernel@vger.kernel.org on Networking patches

> Signed-off-by: Jacek Kowalski <Jacek@jacekk.info>
> Suggested-by: Simon Horman <horms@kernel.org>

As for this patch itself, it looks good to me.
But I think you missed two.

diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c
index b5a31e8d84f4..0e5de52b1067 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_hw.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c
@@ -3997,7 +3997,7 @@ s32 e1000_update_eeprom_checksum(struct e1000_hw *hw)
 		}
 		checksum += eeprom_data;
 	}
-	checksum = (u16)EEPROM_SUM - checksum;
+	checksum = EEPROM_SUM - checksum;
 	if (e1000_write_eeprom(hw, EEPROM_CHECKSUM_REG, 1, &checksum) < 0) {
 		e_dbg("EEPROM Write Error\n");
 		return -E1000_ERR_EEPROM;
diff --git a/drivers/net/ethernet/intel/e1000e/nvm.c b/drivers/net/ethernet/intel/e1000e/nvm.c
index 1c9071396b3c..556dbefdcef9 100644
--- a/drivers/net/ethernet/intel/e1000e/nvm.c
+++ b/drivers/net/ethernet/intel/e1000e/nvm.c
@@ -588,7 +588,7 @@ s32 e1000e_update_nvm_checksum_generic(struct e1000_hw *hw)
 		}
 		checksum += nvm_data;
 	}
-	checksum = (u16)NVM_SUM - checksum;
+	checksum = NVM_SUM - checksum;
 	ret_val = e1000_write_nvm(hw, NVM_CHECKSUM_REG, 1, &checksum);
 	if (ret_val)
 		e_dbg("NVM Write Error while updating checksum.\n");

-- 
pw-bot: changes-requested

WARNING: multiple messages have this Message-ID (diff)
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 1/4] e1000: drop checksum constant cast to u16 in comparisons
Date: Wed, 25 Jun 2025 13:18:28 +0100	[thread overview]
Message-ID: <20250625121828.GB1562@horms.kernel.org> (raw)
In-Reply-To: <46b2b70d-bf53-4b0a-a9f3-dfd8493295b9@jacekk.info>

On Tue, Jun 24, 2025 at 09:29:43PM +0200, Jacek Kowalski wrote:

Hi Jacek,

Thanks for the patchset.

Some feedback at a high level:

1. It's normal for patch-sets, to have a cover letter.
   That provides a handy place for high level comments,
   perhaps ironically, such as this one.

2. Please provide some text in the patch description.
   I know these changes are trivial. But we'd like to have something there.
   E.g.

   Remove unnecessary cast of constants to u16,
   allowing the C type system to do it's thing.

   No behavioural change intended.
   Compile tested only.

3. This patchset should probably be targeted at iwl-next, like this:

	Subject: [PATCH iwl-next] ...

4. Please make sure the patchset applies cleanly to it's target tree.
   It seems that in it's current form the patchset doesn't
   apply to iwl-next or net-next.

5. It's up to you. But in general there is no need
   to CC linux-kernel@vger.kernel.org on Networking patches

> Signed-off-by: Jacek Kowalski <Jacek@jacekk.info>
> Suggested-by: Simon Horman <horms@kernel.org>

As for this patch itself, it looks good to me.
But I think you missed two.

diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c
index b5a31e8d84f4..0e5de52b1067 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_hw.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c
@@ -3997,7 +3997,7 @@ s32 e1000_update_eeprom_checksum(struct e1000_hw *hw)
 		}
 		checksum += eeprom_data;
 	}
-	checksum = (u16)EEPROM_SUM - checksum;
+	checksum = EEPROM_SUM - checksum;
 	if (e1000_write_eeprom(hw, EEPROM_CHECKSUM_REG, 1, &checksum) < 0) {
 		e_dbg("EEPROM Write Error\n");
 		return -E1000_ERR_EEPROM;
diff --git a/drivers/net/ethernet/intel/e1000e/nvm.c b/drivers/net/ethernet/intel/e1000e/nvm.c
index 1c9071396b3c..556dbefdcef9 100644
--- a/drivers/net/ethernet/intel/e1000e/nvm.c
+++ b/drivers/net/ethernet/intel/e1000e/nvm.c
@@ -588,7 +588,7 @@ s32 e1000e_update_nvm_checksum_generic(struct e1000_hw *hw)
 		}
 		checksum += nvm_data;
 	}
-	checksum = (u16)NVM_SUM - checksum;
+	checksum = NVM_SUM - checksum;
 	ret_val = e1000_write_nvm(hw, NVM_CHECKSUM_REG, 1, &checksum);
 	if (ret_val)
 		e_dbg("NVM Write Error while updating checksum.\n");

-- 
pw-bot: changes-requested

  parent reply	other threads:[~2025-06-25 12:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24 19:29 [Intel-wired-lan] [PATCH 1/4] e1000: drop checksum constant cast to u16 in comparisons Jacek Kowalski
2025-06-24 19:29 ` Jacek Kowalski
2025-06-24 19:30 ` [Intel-wired-lan] [PATCH 2/4] e1000e: " Jacek Kowalski
2025-06-24 19:30   ` Jacek Kowalski
2025-06-24 19:30 ` [Intel-wired-lan] [PATCH 3/4] igb: " Jacek Kowalski
2025-06-24 19:30   ` Jacek Kowalski
2025-06-25 12:21   ` [Intel-wired-lan] " Simon Horman
2025-06-25 12:21     ` Simon Horman
2025-06-24 19:31 ` [Intel-wired-lan] [PATCH 4/4] igc: " Jacek Kowalski
2025-06-24 19:31   ` Jacek Kowalski
2025-06-25 12:22   ` [Intel-wired-lan] " Simon Horman
2025-06-25 12:22     ` Simon Horman
2025-06-25 16:12     ` [Intel-wired-lan] " David Laight
2025-06-25 16:12       ` David Laight
2025-06-25 12:18 ` Simon Horman [this message]
2025-06-25 12:18   ` [PATCH 1/4] e1000: " Simon Horman
2025-06-25 12:19   ` [Intel-wired-lan] " Simon Horman
2025-06-25 12:19     ` Simon Horman
2025-06-25 13:03   ` [Intel-wired-lan] " Jacek Kowalski
2025-06-25 13:03     ` 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=20250625121828.GB1562@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 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.