From: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
To: arnd@arndb.de, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, nathan@kernel.org, nsc@kernel.org,
ojeda@kernel.org, masahiroy@kernel.org, linux@weissschuh.net,
tamird@kernel.org, rostedt@goodmis.org, ihor.solodrai@linux.dev,
ritesh.list@gmail.com, maddy@linux.ibm.com, peterz@infradead.org,
venkat88@linux.ibm.com
Subject: [PATCH] char: nvram: Remove unused nvram_mutex to fix -Wunused-variable warning
Date: Mon, 23 Mar 2026 12:54:22 +0530 [thread overview]
Message-ID: <20260323072422.25730-1-venkat88@linux.ibm.com> (raw)
drivers/char/nvram.c defines a static mutex 'nvram_mutex' which is never
used. This results in a compiler warning on linux-next builds:
warning: 'nvram_mutex' defined but not used [-Wunused-variable]
Remove the unused definition to avoid the warning.
Signed-off-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
---
drivers/char/nvram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index 9eff426a9286..2ce3307663ed 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -53,7 +53,7 @@
#include <asm/nvram.h>
#endif
-static DEFINE_MUTEX(nvram_mutex);
+static __maybe_unused DEFINE_MUTEX(nvram_mutex);
static DEFINE_SPINLOCK(nvram_state_lock);
static int nvram_open_cnt; /* #times opened */
static int nvram_open_mode; /* special open modes */
--
2.45.2
next reply other threads:[~2026-03-23 7:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 7:24 Venkat Rao Bagalkote [this message]
2026-03-23 7:35 ` [PATCH] char: nvram: Remove unused nvram_mutex to fix -Wunused-variable warning Venkat Rao Bagalkote
2026-03-23 7:36 ` Greg KH
2026-03-23 7:59 ` Arnd Bergmann
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=20260323072422.25730-1-venkat88@linux.ibm.com \
--to=venkat88@linux.ibm.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=ihor.solodrai@linux.dev \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=ojeda@kernel.org \
--cc=peterz@infradead.org \
--cc=ritesh.list@gmail.com \
--cc=rostedt@goodmis.org \
--cc=tamird@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