lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240403080702.3509288-30-arnd@kernel.org>
Date: Wed,  3 Apr 2024 10:06:47 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: linux-kernel@...r.kernel.org,
	Markuss Broks <markuss.broks@...il.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Karel Balej <balejk@...fyz.cz>
Cc: Arnd Bergmann <arnd@...db.de>,
	Duje Mihanović <duje.mihanovic@...le.hr>,
	Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
	linux-input@...r.kernel.org
Subject: [PATCH 29/34] Input: imagis - remove incorrect ifdef checks

From: Arnd Bergmann <arnd@...db.de>

When CONFIG_OF is disabled, three variables become unused:

drivers/input/touchscreen/imagis.c:391:39: error: unused variable 'imagis_3032c_data' [-Werror,-Wunused-const-variable]
drivers/input/touchscreen/imagis.c:399:39: error: unused variable 'imagis_3038b_data' [-Werror,-Wunused-const-variable]
drivers/input/touchscreen/imagis.c:407:39: error: unused variable 'imagis_3038c_data' [-Werror,-Wunused-const-variable]

There is no real point in building this driver without CONFIG_OF,
so just remove the #ifdef checks and just always build this to avoids
the warnings.

Fixes: 10ad7d7a428f ("input/touchscreen: imagis: Add support for Imagis IST3038B")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/input/touchscreen/imagis.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c
index 074dd6c342ec..d09b10f77a19 100644
--- a/drivers/input/touchscreen/imagis.c
+++ b/drivers/input/touchscreen/imagis.c
@@ -411,7 +411,6 @@ static const struct imagis_properties imagis_3038c_data = {
 	.whoami_val = IST3038C_WHOAMI,
 };
 
-#ifdef CONFIG_OF
 static const struct of_device_id imagis_of_match[] = {
 	{ .compatible = "imagis,ist3032c", .data = &imagis_3032c_data },
 	{ .compatible = "imagis,ist3038b", .data = &imagis_3038b_data },
@@ -419,13 +418,12 @@ static const struct of_device_id imagis_of_match[] = {
 	{ },
 };
 MODULE_DEVICE_TABLE(of, imagis_of_match);
-#endif
 
 static struct i2c_driver imagis_ts_driver = {
 	.driver = {
 		.name = "imagis-touchscreen",
 		.pm = pm_sleep_ptr(&imagis_pm_ops),
-		.of_match_table = of_match_ptr(imagis_of_match),
+		.of_match_table = imagis_of_match,
 	},
 	.probe = imagis_probe,
 };
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ