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: <20200713144930.1034632-26-lee.jones@linaro.org>
Date:   Mon, 13 Jul 2020 15:49:30 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     linus.walleij@...aro.org
Cc:     linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
        Lee Jones <lee.jones@...aro.org>, Ken Xue <Ken.Xue@....com>,
        "Wu, Jeff" <Jeff.Wu@....com>,
        Nehal Shah <Nehal-bakulchandra.Shah@....com>,
        Sundar S K <Shyam-sundar.S-k@....com>
Subject: [PATCH 25/25] pinctrl: pinctrl-amd: Do not define 'struct acpi_device_id' when !CONFIG_ACPI

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

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

 drivers/pinctrl/pinctrl-amd.c:959:36: warning: ‘amd_gpio_acpi_match’ defined but not used [-Wunused-const-variable=]
 959 | static const struct acpi_device_id amd_gpio_acpi_match[] = {

Cc: Ken Xue <Ken.Xue@....com>
Cc: "Wu, Jeff" <Jeff.Wu@....com>
Cc: Nehal Shah <Nehal-bakulchandra.Shah@....com>
Cc: Sundar S K <Shyam-sundar.S-k@....com>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
 drivers/pinctrl/pinctrl-amd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index c34e6a950b3f6..ccf6120311193 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -956,12 +956,14 @@ static int amd_gpio_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id amd_gpio_acpi_match[] = {
 	{ "AMD0030", 0 },
 	{ "AMDI0030", 0},
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, amd_gpio_acpi_match);
+#endif
 
 static struct platform_driver amd_gpio_driver = {
 	.driver		= {
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ