public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] char: nvram: Remove unused nvram_mutex to fix -Wunused-variable warning
@ 2026-03-30  6:22 Venkat Rao Bagalkote
  2026-03-30  6:42 ` Ritesh Harjani
  0 siblings, 1 reply; 2+ messages in thread
From: Venkat Rao Bagalkote @ 2026-03-30  6:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-kbuild, linuxppc-dev, maddy, ritesh.list, arnd, chleroy,
	Venkat Rao Bagalkote

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.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
---
v3:
 - Removed global nvram_mutex entirely

 drivers/char/nvram.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index 9eff426a9286..9ab2744cd375 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -53,7 +53,6 @@
 #include <asm/nvram.h>
 #endif
 
-static 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-30  6:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-30  6:22 [PATCH v3] char: nvram: Remove unused nvram_mutex to fix -Wunused-variable warning Venkat Rao Bagalkote
2026-03-30  6:42 ` Ritesh Harjani

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