From nobody Sun Jun 14 06:09:07 2026 Received: from psionic.psi5.com (psionic.psi5.com [185.187.169.70]) (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 1FA163ACEEB for ; Sun, 3 May 2026 07:49:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.187.169.70 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777794576; cv=none; b=iNPsTYsqNRQl2el3YM+QEyqKyHEiKvk34zM1P0fIFgHgxF2LsF02rqbP7uUxyQLrwyk0rXf0XagKt5bB+2QxhCkqIqrUdK9PxO8spiWEcsYhJoZ6J1NlgfG0esjiPM3MW/HLDOuTHlexEqoIOPtYY2kpVWIN8UVA4xFZApZUAP4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777794576; c=relaxed/simple; bh=dqfjOg9PXILKEc3TmubYbSKtv6FpPaHllxcRY9jEfdQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gfqz01S1navX143m34bRHJx7Xf0F2O142HrbncQ7AmXfCYzKfdCEmmHVUofBTBGtCXiRoQx5NFdmvspE5iEP9AfxTwzbEn8prwXt/dX4zb9EwJGVA4YfbWTEH6jtc3+Gsk7JY7uZhGJAgZ8AYLdlTuv+87AJY0O4tJw4bSr/1U8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hogyros.de; spf=pass smtp.mailfrom=hogyros.de; arc=none smtp.client-ip=185.187.169.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hogyros.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hogyros.de Received: from localhost.localdomain (unknown [IPv6:2400:2410:b120:f200:2e09:4dff:fe00:2e9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by psionic.psi5.com (Postfix) with ESMTPSA id 7B5B13F202; Sun, 3 May 2026 09:49:29 +0200 (CEST) From: Simon Richter To: Greg Kroah-Hartman , Arnd Bergmann , linux-kernel@vger.kernel.org Cc: Simon Richter Subject: [PATCH v2] misc/nvram: only declare mutex where it's used Date: Sun, 3 May 2026 16:47:08 +0900 Message-ID: <20260503074840.609833-1-Simon.Richter@hogyros.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 =20 +#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 */ --=20 2.47.3