Skip to contentSkip to conversation

ixgbe: Remove redundant self-assignments in ACI command execution

PATCH In review Dheeraj Reddy Jonnalagadda 2 participants 2 messages Jan 8, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ixgbe: Remove redundant self-assignments in ACI command execution

Remove redundant statements in ixgbe_aci_send_cmd_execute() where raw_desc[i] is assigned to itself. These self-assignments have no effect and can be safely removed.

Fixes 46761fd52a88 ("ixgbe: Add support for E610 FW Admin Command Interface")
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c +0 -2
index 683c668672d6..408c0874cdc2 100644
@@ -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];
 		}
 	}
 
@@ -153,7 +152,6 @@ static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw,
 	if ((hicr & IXGBE_PF_HICR_EV) && !(hicr & IXGBE_PF_HICR_C)) {
 		for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
 			raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA_2(i));
-			raw_desc[i] = raw_desc[i];
 		}
 	}
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 16 lines · Dheeraj Reddy Jonnalagadda

Remove redundant statements in ixgbe_aci_send_cmd_execute() where raw_desc[i] is assigned to itself. These self-assignments have no effect and can be safely removed.

Fixes 46761fd52a88 ("ixgbe: Add support for E610 FW Admin Command Interface")
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c +0 -0
index 683c668672d6..408c0874cdc2 100644

drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, · line 148

Quoted 4 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];

raw_desc should be always in le32, probably there was a conversion which was removed between patchset versions. Adding orginal author in CC to confirm that no conversion here is fine.

Thanks,
Michal

Quoted 13 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c +0 -1
 		}
 	}
 
@@ -153,7 +152,6 @@ static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw,
 	if ((hicr & IXGBE_PF_HICR_EV) && !(hicr & IXGBE_PF_HICR_C)) {
 		for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
 			raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA_2(i));
-			raw_desc[i] = raw_desc[i];
 		}
 	}
 
Signature · 1 line
2.34.1