From nobody Sun Jun 14 06:11:30 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 ADAA811CBA for ; Sun, 3 May 2026 06:47:54 +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=1777790877; cv=none; b=UEjsok++gqx3Wx54eO5553GFkHiZwyq6UrN4zSY3ywTHSNVbBRxmOs7TZY5wT6lqJT9ZCV/KxiPOEUrLGPPOs8Mg0EAY3bYkKgS1SUiRJ2BBevEecRArvndEBRSPLZskX6HFfND3M7CQ/izy6khFCSKThTGU4iNMYTIcXqR17a0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777790877; c=relaxed/simple; bh=NAGjAn4duTpF/PoSW0bIDJM1iK9qbUhYv3TDh1ne/mE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KiVLCZteaKtIGVEASv+LJhDoPiTIy7wPQeQnyZf00l2JqTFsc2NhgL8UMyLPASEMyffRWYrOyD55AH9oobUsGTDtnIq64vImtkh9qYgG0I8M40ocqr6vXCzPjOkpRA7i3XqcQIsLdQAKOztK34FovmqWbUI0yHS+/EW4wrIsC9Y= 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 7F0BE3F202; Sun, 3 May 2026 08:47:50 +0200 (CEST) From: Simon Richter To: Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: Simon Richter Subject: [PATCH] misc/nvram: only declare mutex where it's used Date: Sun, 3 May 2026 15:46:59 +0900 Message-ID: <20260503064739.609401-1-Simon.Richter@hogyros.de> X-Mailer: git-send-email 2.47.3 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. 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