ixgbe: remove self assignment
Subsystems (3)
PATCH 1/1 ixgbe: remove self assignment
Variable self assignment does not have any effect.
Addresses-Coverity-ID: 1641823 ("Self assignment")
--- drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c +0 -1
@@ -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,
Signature · 1 line
Ethan Carter Edwards <[email protected]>
Quoted 14 lines · 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 <[email protected]>--- drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 1 - 1 file changed, 1 deletion(-)drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c +0
-0
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, · line 150
Quoted 7 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c +0
-1@@ -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/[email protected]/
Thanks,
Michal
Quoted 8 lines
---
base-commit:a64dcfb451e254085a7daee5fe51bf22959d52d3
change-id: 20250209-e610-self-85eac1f0e338Best regards,
Signature · 1 line
Ethan Carter Edwards <[email protected]>
Quoted 1 line · Ethan Carter Edwards
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