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]
Date:   Thu, 16 Jul 2020 14:59:00 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     jic23@...nel.org, knaack.h@....de, lars@...afoo.de,
        pmeerw@...erw.net
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-iio@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
        Tiberiu Breana <tiberiu.a.breana@...el.com>
Subject: [PATCH 02/30] iio: accel: bma220_spi: Do not define 'struct acpi_device_id' when !CONFIG_ACPI

Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI,
struct 'bma220_acpi_id' becomes defined but unused.

Fixes the following W=1 kernel build warning(s):

 drivers/iio/accel/bma220_spi.c:312:36: warning: ‘bma220_acpi_id’ defined but not used [-Wunused-const-variable=]
 312 | static const struct acpi_device_id bma220_acpi_id[] = {
 | ^~~~~~~~~~~~~~

Cc: Tiberiu Breana <tiberiu.a.breana@...el.com>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
 drivers/iio/accel/bma220_spi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iio/accel/bma220_spi.c b/drivers/iio/accel/bma220_spi.c
index cae905039cb62..439618d815594 100644
--- a/drivers/iio/accel/bma220_spi.c
+++ b/drivers/iio/accel/bma220_spi.c
@@ -309,12 +309,14 @@ static const struct spi_device_id bma220_spi_id[] = {
 	{}
 };
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id bma220_acpi_id[] = {
 	{"BMA0220", 0},
 	{}
 };
 
 MODULE_DEVICE_TABLE(spi, bma220_spi_id);
+#endif
 
 static struct spi_driver bma220_driver = {
 	.driver = {
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ