All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] misc/nvram: only declare mutex where it's used
@ 2026-05-03  6:46 Simon Richter
  2026-05-03  6:53 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Richter @ 2026-05-03  6:46 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman, linux-kernel; +Cc: Simon Richter

The ioctls using this are platform specific compatibility code. On other
platforms, this generates a warning for an unused static variable.

Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
---
 drivers/char/nvram.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index 9eff426a9286..34bbeba073fe 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -53,7 +53,10 @@
 #include <asm/nvram.h>
 #endif
 
+#if defined(CONFIG_PPC32) || defined(CONFIG_X86) || defined(CONFIG_M68K)
 static DEFINE_MUTEX(nvram_mutex);
+#endif
+
 static DEFINE_SPINLOCK(nvram_state_lock);
 static int nvram_open_cnt;	/* #times opened */
 static int nvram_open_mode;	/* special open modes */
-- 
2.47.3


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

end of thread, other threads:[~2026-05-03  9:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-03  6:46 [PATCH] misc/nvram: only declare mutex where it's used Simon Richter
2026-05-03  6:53 ` Greg Kroah-Hartman
2026-05-03  7:45   ` Simon Richter
2026-05-03  7:47     ` [PATCH v2] " Simon Richter
2026-05-03  8:19       ` Greg Kroah-Hartman
2026-05-03  9:15         ` Simon Richter
2026-05-03  8:19       ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.