From: deller@kernel.org
To: netdev@vger.kernel.org, linux-parisc@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Helge Deller <deller@gmx.de>
Subject: [PATCH] net: tulip: avoid unused variable warning
Date: Sun, 9 Mar 2025 22:42:38 +0100 [thread overview]
Message-ID: <20250309214238.66155-1-deller@kernel.org> (raw)
From: Helge Deller <deller@gmx.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@gmx.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
next reply other threads:[~2025-03-09 21:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-09 21:42 deller [this message]
2025-03-12 13:14 ` [PATCH] net: tulip: avoid unused variable warning Simon Horman
2025-03-12 14:08 ` Helge Deller
2025-03-13 10:50 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250309214238.66155-1-deller@kernel.org \
--to=deller@kernel.org \
--cc=deller@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).