lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220521130606.52642-1-gautam.linuxkernel@gmail.com>
Date:   Sat, 21 May 2022 06:06:06 -0700
From:   Gautam Menghani <gautam.linuxkernel@...il.com>
To:     airlied@...ux.ie
Cc:     Gautam Menghani <gautam.linuxkernel@...il.com>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] 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;

Signed-off-by: Gautam Menghani <gautam.linuxkernel@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ