From: Arnd Bergmann <arnd@kernel.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Benjamin Tissoires <bentiss@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Takashi Iwai <tiwai@suse.de>,
Jonathan Denose <jdenose@google.com>,
Erick Archer <erick.archer@outlook.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] [RESEND] Input: synaptics: hide unused smbus_pnp_ids[] array
Date: Tue, 25 Feb 2025 15:54:38 +0100 [thread overview]
Message-ID: <20250225145451.1141995-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
When SMBUS is disabled, this is never referenced, causing a W=1 warning:
drivers/input/mouse/synaptics.c:164:27: error: 'smbus_pnp_ids' defined but not used [-Werror=unused-const-variable=]
Hide the array behind the same #ifdef as the code referencing it.
Fixes: e839ffab0289 ("Input: synaptics - add support for Intertouch devices")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Sent this about a year ago, the patch is still needed, so resending without changes
---
drivers/input/mouse/synaptics.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index aba57abe6978..309c360aab55 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -161,6 +161,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
NULL
};
+#ifdef CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS
static const char * const smbus_pnp_ids[] = {
/* all of the topbuttonpad_pnp_ids are valid, we just add some extras */
"LEN0048", /* X1 Carbon 3 */
@@ -196,6 +197,7 @@ static const char * const smbus_pnp_ids[] = {
"SYN3257", /* HP Envy 13-ad105ng */
NULL
};
+#endif
static const char * const forcepad_pnp_ids[] = {
"SYN300D",
--
2.39.5
next reply other threads:[~2025-02-25 14:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 14:54 Arnd Bergmann [this message]
2025-02-25 20:59 ` [PATCH] [RESEND] Input: synaptics: hide unused smbus_pnp_ids[] array Dmitry Torokhov
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=20250225145451.1141995-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=bentiss@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=erick.archer@outlook.com \
--cc=jdenose@google.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.