* [PATCH] [RESEND] Input: synaptics: hide unused smbus_pnp_ids[] array
@ 2025-02-25 14:54 Arnd Bergmann
2025-02-25 20:59 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2025-02-25 14:54 UTC (permalink / raw)
To: Dmitry Torokhov, Benjamin Tissoires
Cc: Arnd Bergmann, Takashi Iwai, Jonathan Denose, Erick Archer,
linux-input, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [RESEND] Input: synaptics: hide unused smbus_pnp_ids[] array
2025-02-25 14:54 [PATCH] [RESEND] Input: synaptics: hide unused smbus_pnp_ids[] array Arnd Bergmann
@ 2025-02-25 20:59 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2025-02-25 20:59 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Benjamin Tissoires, Arnd Bergmann, Takashi Iwai, Jonathan Denose,
Erick Archer, linux-input, linux-kernel
On Tue, Feb 25, 2025 at 03:54:38PM +0100, Arnd Bergmann wrote:
> 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>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-25 20:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-25 14:54 [PATCH] [RESEND] Input: synaptics: hide unused smbus_pnp_ids[] array Arnd Bergmann
2025-02-25 20:59 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox