From: Arnd Bergmann Date: Wed, 9 Apr 2025 12:23:00 +0000 (+0200) Subject: comedi: ni_atmio: avoid warning for unused device_ids[] table X-Git-Tag: v6.16-rc1~30^2~67 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=a7924f4c489bb6a3f28850f13eaa3e1d2747d0fb;p=linux-block.git comedi: ni_atmio: avoid warning for unused device_ids[] table When the driver is built-in, it produces a W=1 warning: drivers/comedi/drivers/ni_atmio.c:209:35: error: 'device_ids' defined but not used [-Werror=unused-const-variable=] 209 | static const struct pnp_device_id device_ids[] = { The actual probe() function has a different way of identifying the hardware, so just mark this one as __maybe_unused so it can be dropped when built-in. Reviewed-by: Ian Abbott Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250409122314.2848028-8-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/comedi/drivers/ni_atmio.c b/drivers/comedi/drivers/ni_atmio.c index 330ae1c58800..b4e759e5703f 100644 --- a/drivers/comedi/drivers/ni_atmio.c +++ b/drivers/comedi/drivers/ni_atmio.c @@ -215,7 +215,7 @@ static const int ni_irqpin[] = { #include "ni_mio_common.c" -static const struct pnp_device_id device_ids[] = { +static const struct pnp_device_id __maybe_unused device_ids[] = { {.id = "NIC1900", .driver_data = 0}, {.id = "NIC2400", .driver_data = 0}, {.id = "NIC2500", .driver_data = 0},