public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/char/agp: Remove unnecessary assignment in cache_nbs()
@ 2022-05-21 13:06 Gautam Menghani
  0 siblings, 0 replies; only message in thread
From: Gautam Menghani @ 2022-05-21 13:06 UTC (permalink / raw)
  To: airlied; +Cc: Gautam Menghani, linux-kernel

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;

Signed-off-by: Gautam Menghani <gautam.linuxkernel@gmail.com>
---
 drivers/char/agp/amd64-agp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index dc78a4fb879e..5f64991c73bf 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -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) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-21 13:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-21 13:06 [PATCH] drivers/char/agp: Remove unnecessary assignment in cache_nbs() Gautam Menghani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox