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  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:   Mon,  6 Jul 2020 14:33:37 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     gregkh@...uxfoundation.org
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
        Tony Prisk <linux@...sktech.co.nz>,
        Alan Stern <stern@...land.harvard.edu>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Steven Brown <sbrown@...tland.com>,
        Hauke Mehrtens <hauke@...ke-m.de>,
        de Goede <hdegoede@...hat.com>, Michael Buesch <m@...s.ch>
Subject: [PATCH 28/32] usb: host: ehci-platform: Do not define 'struct acpi_device_id' when !CONFIG_ACPI

Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI,
struct ehci_acpi_match becomes defined by unused.

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

 drivers/usb/host/ehci-platform.c:478:36: warning: ‘ehci_acpi_match’ defined but not used [-Wunused-const-variable=]
 478 | static const struct acpi_device_id ehci_acpi_match[] = {
 | ^~~~~~~~~~~~~~~

Cc: Tony Prisk <linux@...sktech.co.nz>
Cc: Alan Stern <stern@...land.harvard.edu>
Cc: Philipp Zabel <p.zabel@...gutronix.de>
Cc: Steven Brown <sbrown@...tland.com>
Cc: Hauke Mehrtens <hauke@...ke-m.de>
Cc: de Goede <hdegoede@...hat.com>
Cc: Michael Buesch <m@...s.ch>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
 drivers/usb/host/ehci-platform.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index e9a49007cce4a..006c4f6188a52 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -475,11 +475,13 @@ static const struct of_device_id vt8500_ehci_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id ehci_acpi_match[] = {
 	{ "PNP0D20", 0 }, /* EHCI controller without debug */
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, ehci_acpi_match);
+#endif
 
 static const struct platform_device_id ehci_platform_table[] = {
 	{ "ehci-platform", 0 },
-- 
2.25.1

Powered by blists - more mailing lists