Skip to contentSkip to conversation

drivers/char/agp: Remove unnecessary assignment in cache_nbs()

PATCH New Gautam Menghani 1 participant 1 message May 21, 2022 Agpgart driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/char/agp: Remove unnecessary assignment in cache_nbs()

Remove unnecessary assignment for the variable i. This fixes the clang scan warning :
warning: Value stored to 'i' is never read [deadcode.DeadStores]

        i = 0;
---
 drivers/char/agp/amd64-agp.c | 1 -
 1 file changed, 1 deletion(-)
drivers/char/agp/amd64-agp.c +0 -1
index dc78a4fb879e..5f64991c73bf 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.25.1