public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Christophe Leroy" <chleroy@kernel.org>,
	"Venkat Rao Bagalkote" <venkat88@linux.ibm.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nicolas Schier" <nsc@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Masahiro Yamada" <masahiroy@kernel.org>,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	tamird@kernel.org, "Steven Rostedt" <rostedt@goodmis.org>,
	ihor.solodrai@linux.dev,
	"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
	"Madhavan Srinivasan" <maddy@linux.ibm.com>,
	"Peter Zijlstra" <peterz@infradead.org>
Subject: Re: [PATCH v2] char: nvram: Remove unused nvram_mutex to fix -Wunused-variable warning
Date: Mon, 23 Mar 2026 18:58:45 +0100	[thread overview]
Message-ID: <00d4c865-3068-4f98-a32f-e9565cf1499d@app.fastmail.com> (raw)
In-Reply-To: <e6db8617-6b12-4f90-967d-85c9f7805823@kernel.org>

On Mon, Mar 23, 2026, at 11:14, Christophe Leroy (CS GROUP) wrote:
> Le 23/03/2026 à 08:32, Venkat Rao Bagalkote a écrit :
> diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
> index 9eff426a9286..2fd744bf9093 100644
> --- a/drivers/char/nvram.c
> +++ b/drivers/char/nvram.c
> @@ -308,8 +308,10 @@ static long nvram_misc_ioctl(struct file *file, 
> unsigned int cmd,
>   		}
>   #endif
>   		break;
> -#ifdef CONFIG_PPC32
>   	case IOC_NVRAM_SYNC:
> +		if (IS_ENABLED(CONFIG_PPC64))
> +			break;
> +
>   		if (ppc_md.nvram_sync != NULL) {
>   			mutex_lock(&nvram_mutex);
>   			ppc_md.nvram_sync();

Right, this works as well, though I still like the idea better
of removing the mutex and all its callers, leaving the locking
to be done inside of the individual operations, as they all
do.

     Arnd


  reply	other threads:[~2026-03-23 17:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23  7:32 [PATCH v2] char: nvram: Remove unused nvram_mutex to fix -Wunused-variable warning Venkat Rao Bagalkote
2026-03-23  7:50 ` Greg KH
2026-03-23 10:14 ` Christophe Leroy (CS GROUP)
2026-03-23 17:58   ` Arnd Bergmann [this message]
2026-03-25  9:04   ` Ritesh Harjani

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=00d4c865-3068-4f98-a32f-e9565cf1499d@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=chleroy@kernel.org \
    --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 \
    --cc=venkat88@linux.ibm.com \
    /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