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-next>] [day] [month] [year] [list]
Message-Id: <20240308185419.1929060-1-ben.dooks@codethink.co.uk>
Date: Fri,  8 Mar 2024 18:54:19 +0000
From: Ben Dooks <ben.dooks@...ethink.co.uk>
To: linux-kernel@...r.kernel.org
Cc: hsweeten@...ionengravers.com,
	abbotti@....co.uk,
	Ben Dooks <ben.dooks@...ethink.co.uk>
Subject: [PATCH] comedi: don't build module device_ids if built in

If not building as a module, then the device_ids[] array is not used
by the  MODULE_DEVICE_TABLE(pnp, device_ids) so remove the warning
about it not being used by enclosing it in #ifdef MODULE

Fixes:

drivers/comedi/drivers/ni_atmio.c:209:35: warning: ‘device_ids’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Ben Dooks <ben.dooks@...ethink.co.uk>
---
 drivers/comedi/drivers/ni_atmio.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/comedi/drivers/ni_atmio.c b/drivers/comedi/drivers/ni_atmio.c
index 8876a1d24c56..f0dbe4c2341a 100644
--- a/drivers/comedi/drivers/ni_atmio.c
+++ b/drivers/comedi/drivers/ni_atmio.c
@@ -206,6 +206,7 @@ static const int ni_irqpin[] = {
 
 #include "ni_mio_common.c"
 
+#ifndef MODULE
 static const struct pnp_device_id device_ids[] = {
 	{.id = "NIC1900", .driver_data = 0},
 	{.id = "NIC2400", .driver_data = 0},
@@ -216,6 +217,7 @@ static const struct pnp_device_id device_ids[] = {
 };
 
 MODULE_DEVICE_TABLE(pnp, device_ids);
+#endif
 
 static int ni_isapnp_find_board(struct pnp_dev **dev)
 {
-- 
2.37.2.352.g3c44437643


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ