Skip to contentSkip to conversation

x86/amd_nb: remove redundant initialization of variable i

PATCH New Colin Ian King 1 participant 1 message Jul 4, 2022

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

PATCH 1/1 x86/amd_nb: remove redundant initialization of variable i

Variable i is initialized with a value and then re-assigned with the same value in the following for-loop. The first initialization is redundant and can be removed.

---
 drivers/char/agp/amd64-agp.c | 1 -
 1 file changed, 1 deletion(-)
drivers/char/agp/amd64-agp.c +0 -1
index 84a4aa9312cf..c7bf2c4bc0b0 100644
@@ -333,7 +333,6 @@ static int cache_nbs(struct pci_dev *pdev, u32 cap_ptr)
 	if (!amd_nb_has_feature(AMD_NB_GART))
 		return -ENODEV;
 
-	i = 0;
 	for (i = 0; i < amd_nb_num(); i++) {
 		struct pci_dev *dev = node_to_amd_nb(i)->misc;
 		if (fix_northbridge(dev, pdev, cap_ptr) < 0) {
Signature · 1 line
2.35.3