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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250309214238.66155-1-deller@kernel.org>
Date: Sun,  9 Mar 2025 22:42:38 +0100
From: deller@...nel.org
To: netdev@...r.kernel.org,
	linux-parisc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Helge Deller <deller@....de>
Subject: [PATCH] net: tulip: avoid unused variable warning

From: Helge Deller <deller@....de>

When compiling with W=1 and CONFIG_TULIP_MWI=n one gets this warning:
 drivers/net/ethernet/dec/tulip/tulip_core.c: In function ‘tulip_init_one’:
 drivers/net/ethernet/dec/tulip/tulip_core.c:1309:22: warning: variable ‘force_csr0’ set but not used

Avoid it by annotating the variable __maybe_unused, which seems to be
the easiest solution.

Signed-off-by: Helge Deller <deller@....de>
---
 drivers/net/ethernet/dec/tulip/tulip_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c
index 27e01d780cd0..1ab65deb280c 100644
--- a/drivers/net/ethernet/dec/tulip/tulip_core.c
+++ b/drivers/net/ethernet/dec/tulip/tulip_core.c
@@ -1306,7 +1306,7 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	const char *chip_name = tulip_tbl[chip_idx].chip_name;
 	unsigned int eeprom_missing = 0;
 	u8 addr[ETH_ALEN] __aligned(2);
-	unsigned int force_csr0 = 0;
+	unsigned int force_csr0 __maybe_unused = 0;
 
 	board_idx++;
 
-- 
2.47.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ