* [Intel-wired-lan] [PATCH] ixgbe: remove self assignment
@ 2025-02-10 4:47 ` Ethan Carter Edwards
0 siblings, 0 replies; 6+ messages in thread
From: Ethan Carter Edwards @ 2025-02-10 4:47 UTC (permalink / raw)
To: Piotr Kwapulinski
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jedrzej Jagielski,
Simon Horman, Stefan Wegrzyn, Michal Swiatkowski, intel-wired-lan,
netdev, linux-kernel, linux-hardening, linux-hardening,
Ethan Carter Edwards
Variable self assignment does not have any effect.
Addresses-Coverity-ID: 1641823 ("Self assignment")
Fixes: 46761fd52a886 ("ixgbe: Add support for E610 FW Admin Command Interface")
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
index 683c668672d65535fca3b2fe6f58a9deda1188fa..6b0bce92476c3c5ec3cf7ab79864b394b592c6d4 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
@@ -145,7 +145,6 @@ static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw,
if ((hicr & IXGBE_PF_HICR_SV)) {
for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA(i));
- raw_desc[i] = raw_desc[i];
}
}
---
base-commit: a64dcfb451e254085a7daee5fe51bf22959d52d3
change-id: 20250209-e610-self-85eac1f0e338
Best regards,
--
Ethan Carter Edwards <ethan@ethancedwards.com>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] ixgbe: remove self assignment
@ 2025-02-10 4:47 ` Ethan Carter Edwards
0 siblings, 0 replies; 6+ messages in thread
From: Ethan Carter Edwards @ 2025-02-10 4:47 UTC (permalink / raw)
To: Piotr Kwapulinski
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jedrzej Jagielski,
Simon Horman, Stefan Wegrzyn, Michal Swiatkowski, intel-wired-lan,
netdev, linux-kernel, linux-hardening, linux-hardening,
Ethan Carter Edwards
Variable self assignment does not have any effect.
Addresses-Coverity-ID: 1641823 ("Self assignment")
Fixes: 46761fd52a886 ("ixgbe: Add support for E610 FW Admin Command Interface")
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
index 683c668672d65535fca3b2fe6f58a9deda1188fa..6b0bce92476c3c5ec3cf7ab79864b394b592c6d4 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
@@ -145,7 +145,6 @@ static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw,
if ((hicr & IXGBE_PF_HICR_SV)) {
for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA(i));
- raw_desc[i] = raw_desc[i];
}
}
---
base-commit: a64dcfb451e254085a7daee5fe51bf22959d52d3
change-id: 20250209-e610-self-85eac1f0e338
Best regards,
--
Ethan Carter Edwards <ethan@ethancedwards.com>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Intel-wired-lan] [PATCH] ixgbe: remove self assignment
2025-02-10 4:47 ` Ethan Carter Edwards
@ 2025-02-10 5:36 ` Michal Swiatkowski
-1 siblings, 0 replies; 6+ messages in thread
From: Michal Swiatkowski @ 2025-02-10 5:36 UTC (permalink / raw)
To: Ethan Carter Edwards
Cc: Piotr Kwapulinski, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Jedrzej Jagielski, Simon Horman, Stefan Wegrzyn,
Michal Swiatkowski, intel-wired-lan, netdev, linux-kernel,
linux-hardening
On Sun, Feb 09, 2025 at 11:47:24PM -0500, Ethan Carter Edwards wrote:
> Variable self assignment does not have any effect.
>
> Addresses-Coverity-ID: 1641823 ("Self assignment")
> Fixes: 46761fd52a886 ("ixgbe: Add support for E610 FW Admin Command Interface")
> Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> index 683c668672d65535fca3b2fe6f58a9deda1188fa..6b0bce92476c3c5ec3cf7ab79864b394b592c6d4 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> @@ -145,7 +145,6 @@ static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw,
> if ((hicr & IXGBE_PF_HICR_SV)) {
> for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
> raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA(i));
> - raw_desc[i] = raw_desc[i];
> }
> }
>
Thanks for the patch. This change is already in progress [1] (I hope,
waiting for v3).
[1] https://lore.kernel.org/netdev/20250115034117.172999-1-dheeraj.linuxdev@gmail.com/
Thanks,
Michal
>
> ---
> base-commit: a64dcfb451e254085a7daee5fe51bf22959d52d3
> change-id: 20250209-e610-self-85eac1f0e338
>
> Best regards,
> --
> Ethan Carter Edwards <ethan@ethancedwards.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ixgbe: remove self assignment
@ 2025-02-10 5:36 ` Michal Swiatkowski
0 siblings, 0 replies; 6+ messages in thread
From: Michal Swiatkowski @ 2025-02-10 5:36 UTC (permalink / raw)
To: Ethan Carter Edwards
Cc: Piotr Kwapulinski, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Jedrzej Jagielski, Simon Horman, Stefan Wegrzyn,
Michal Swiatkowski, intel-wired-lan, netdev, linux-kernel,
linux-hardening
On Sun, Feb 09, 2025 at 11:47:24PM -0500, Ethan Carter Edwards wrote:
> Variable self assignment does not have any effect.
>
> Addresses-Coverity-ID: 1641823 ("Self assignment")
> Fixes: 46761fd52a886 ("ixgbe: Add support for E610 FW Admin Command Interface")
> Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> index 683c668672d65535fca3b2fe6f58a9deda1188fa..6b0bce92476c3c5ec3cf7ab79864b394b592c6d4 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> @@ -145,7 +145,6 @@ static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw,
> if ((hicr & IXGBE_PF_HICR_SV)) {
> for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
> raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA(i));
> - raw_desc[i] = raw_desc[i];
> }
> }
>
Thanks for the patch. This change is already in progress [1] (I hope,
waiting for v3).
[1] https://lore.kernel.org/netdev/20250115034117.172999-1-dheeraj.linuxdev@gmail.com/
Thanks,
Michal
>
> ---
> base-commit: a64dcfb451e254085a7daee5fe51bf22959d52d3
> change-id: 20250209-e610-self-85eac1f0e338
>
> Best regards,
> --
> Ethan Carter Edwards <ethan@ethancedwards.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-wired-lan] [PATCH] ixgbe: remove self assignment
2025-02-10 4:47 ` Ethan Carter Edwards
@ 2025-02-10 13:24 ` Andrew Lunn
-1 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2025-02-10 13:24 UTC (permalink / raw)
To: Ethan Carter Edwards
Cc: Piotr Kwapulinski, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Jedrzej Jagielski, Simon Horman, Stefan Wegrzyn,
Michal Swiatkowski, intel-wired-lan, netdev, linux-kernel,
linux-hardening
On Sun, Feb 09, 2025 at 11:47:24PM -0500, Ethan Carter Edwards wrote:
> Variable self assignment does not have any effect.
Hi Ethan
As a general rule, it would be good to explain in the comment message
what research you did to find out why there is a self assignment, and
why just deleting it is the correct solution.
There are somewhat legitimate reasons to do a self assign, some older
compilers would warn about variables which were set but then never
used, for example. Or it could be a dumb copy/paste error when writing
the code. But more likely than not, the developer had something in
mind, got distracted, and never finished the code. Which appears to
the issue here.
If you cannot figure out what the correct fix is, please just email to
the list, Cc: the Maintainer of the file, pointing out the problem.
Andrew
---
pw-bot: cr
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ixgbe: remove self assignment
@ 2025-02-10 13:24 ` Andrew Lunn
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2025-02-10 13:24 UTC (permalink / raw)
To: Ethan Carter Edwards
Cc: Piotr Kwapulinski, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Jedrzej Jagielski, Simon Horman, Stefan Wegrzyn,
Michal Swiatkowski, intel-wired-lan, netdev, linux-kernel,
linux-hardening
On Sun, Feb 09, 2025 at 11:47:24PM -0500, Ethan Carter Edwards wrote:
> Variable self assignment does not have any effect.
Hi Ethan
As a general rule, it would be good to explain in the comment message
what research you did to find out why there is a self assignment, and
why just deleting it is the correct solution.
There are somewhat legitimate reasons to do a self assign, some older
compilers would warn about variables which were set but then never
used, for example. Or it could be a dumb copy/paste error when writing
the code. But more likely than not, the developer had something in
mind, got distracted, and never finished the code. Which appears to
the issue here.
If you cannot figure out what the correct fix is, please just email to
the list, Cc: the Maintainer of the file, pointing out the problem.
Andrew
---
pw-bot: cr
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-02-10 16:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 4:47 [Intel-wired-lan] [PATCH] ixgbe: remove self assignment Ethan Carter Edwards
2025-02-10 4:47 ` Ethan Carter Edwards
2025-02-10 5:36 ` [Intel-wired-lan] " Michal Swiatkowski
2025-02-10 5:36 ` Michal Swiatkowski
2025-02-10 13:24 ` [Intel-wired-lan] " Andrew Lunn
2025-02-10 13:24 ` Andrew Lunn
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.