The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Simon Richter <Simon.Richter@hogyros.de>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] misc/nvram: only declare mutex where it's used
Date: Sun, 3 May 2026 10:19:31 +0200	[thread overview]
Message-ID: <2026050301-gladiator-carport-18bb@gregkh> (raw)
In-Reply-To: <20260503074840.609833-1-Simon.Richter@hogyros.de>

On Sun, May 03, 2026 at 04:47:08PM +0900, Simon Richter wrote:
> The ioctls using this are platform specific compatibility code. On other
> platforms, this generates a warning for an unused static variable.
> 
> Fixes: 20e07af71f34d ("powerpc: Adopt nvram module for PPC64")
> 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
> 

Why has no one ever noticed this since 2019?  What changed recently to
cause this warning to show up?

thanks,

greg k-h

  reply	other threads:[~2026-05-03  8:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-05-03  9:15         ` Simon Richter
2026-05-03  8:19       ` 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=2026050301-gladiator-carport-18bb@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=Simon.Richter@hogyros.de \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@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