From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D2283ACA4C for ; Sun, 3 May 2026 08:20:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777796413; cv=none; b=hU2AfceQ5st7gA5JQ1dyQQh62mqcokDenB9peGkI0ue4vEhYtYMx1OFoe+jj9p3DndanpyX9MqWgrdJHTcnaj32vbIcGmA5N9Y6MPArTp67u7ojO/I6vqmFJ1Oak4q8t08N8pN1cosz2y5gmRmGIBgrT2cBX6yfCISNnnYmumbQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777796413; c=relaxed/simple; bh=+6YOgjhQ4k1qx3fuQv4jeA/cMqUJoVlyWYJm8owDBU8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=G5nf6RwiTZQJ0AVWi31j8OyTuB0bjRoCuEwT/Cv4GCFiS4nO8og/U2sxXGTUZqHybU/m0sJub9oNajulJw/WgDBO0obT4eDNvCQKN3iAgEG4iZQBXYicIdP0NefLRvRpLfII3XLq1Xkgo6+Q2k4TQkThHg9+2VDI1Stm4WejsTI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=n31XKm0+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="n31XKm0+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7659FC2BCB8; Sun, 3 May 2026 08:20:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777796412; bh=+6YOgjhQ4k1qx3fuQv4jeA/cMqUJoVlyWYJm8owDBU8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=n31XKm0+Z1IeOI7SwWyZBNmoXNhBVafPaoiyEyqYCmWbe+uFgb6CpxMjt6rQJ3K1r SjlMQMrzV5UEODwhJij2N1pqcJtjNg1neGUaFJ9thhd0rAP1E7+ns6O10RbBBLnShO /XAZqzGzhpjkfskAh14uYGxcnNqPH6+c7VEwkCLM= Date: Sun, 3 May 2026 10:19:31 +0200 From: Greg Kroah-Hartman To: Simon Richter Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] misc/nvram: only declare mutex where it's used Message-ID: <2026050301-gladiator-carport-18bb@gregkh> References: <20260503074840.609833-1-Simon.Richter@hogyros.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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 > #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