* [PATCH] nvram: Only define nvram_mutex where it is used
@ 2026-05-25 8:03 Mukesh Kumar Chaurasiya (IBM)
2026-05-27 13:30 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Mukesh Kumar Chaurasiya (IBM) @ 2026-05-25 8:03 UTC (permalink / raw)
To: arnd, gregkh, linux-kernel; +Cc: Mukesh Kumar Chaurasiya (IBM)
nvram_mutex is currently defined unconditionally, but is only used on
x86, ppc32 and m68k. This causes an unused symbol warning on other
architectures.
Restrict the mutex definition to the architectures that actually require
it and avoid generating unnecessary warnings on the remaining platforms.
Signed-off-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
---
drivers/char/nvram.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index 9eff426a9286..72ddb225a2ba 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -53,7 +53,10 @@
#include <asm/nvram.h>
#endif
+#if IS_ENABLED(CONFIG_PPC32) || IS_ENABLED(CONFIG_X86) || IS_ENABLED(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.54.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] nvram: Only define nvram_mutex where it is used
2026-05-25 8:03 [PATCH] nvram: Only define nvram_mutex where it is used Mukesh Kumar Chaurasiya (IBM)
@ 2026-05-27 13:30 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2026-05-27 13:30 UTC (permalink / raw)
To: Mukesh Kumar Chaurasiya (IBM); +Cc: arnd, gregkh, linux-kernel
Hi Mukesh,
On Mon, 25 May 2026 at 10:04, Mukesh Kumar Chaurasiya (IBM)
<mkchauras@gmail.com> wrote:
> nvram_mutex is currently defined unconditionally, but is only used on
> x86, ppc32 and m68k. This causes an unused symbol warning on other
> architectures.
>
> Restrict the mutex definition to the architectures that actually require
> it and avoid generating unnecessary warnings on the remaining platforms.
>
> Signed-off-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
Thanks for your patch!
This seems to need more coordination in and outside IBM?
[PATCH v5] char/nvram: Remove redundant nvram_mutex
https://lore.kernel.org/all/20260428061540.73668-1-venkat88@linux.ibm.com/
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-27 13:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-25 8:03 [PATCH] nvram: Only define nvram_mutex where it is used Mukesh Kumar Chaurasiya (IBM)
2026-05-27 13:30 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome