* [PATCH 1/2] static: gpib: hp82341: add MODULE_DESCRIPTION
@ 2025-02-17 13:13 Arnd Bergmann
2025-02-17 13:13 ` [PATCH 2/2] [v2] staging: gpib: comment out pnp_device_id tables Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2025-02-17 13:13 UTC (permalink / raw)
To: Dave Penkler, Greg Kroah-Hartman
Cc: Arnd Bergmann, Dan Carpenter, Nihar Chaithanya, Rohit Chavan,
linux-staging, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
One more description turned out to be missing
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/gpib/hp_82341/hp_82341.o
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/gpib/hp_82341/hp_82341.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/gpib/hp_82341/hp_82341.c b/drivers/staging/gpib/hp_82341/hp_82341.c
index 800f99c05566..cf5cd1edc41d 100644
--- a/drivers/staging/gpib/hp_82341/hp_82341.c
+++ b/drivers/staging/gpib/hp_82341/hp_82341.c
@@ -16,6 +16,7 @@
#include <linux/isapnp.h>
MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("GPIB driver for hp 82341a/b/c/d boards");
static unsigned short read_and_clear_event_status(gpib_board_t *board);
static void set_transfer_counter(struct hp_82341_priv *hp_priv, int count);
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] [v2] staging: gpib: comment out pnp_device_id tables
2025-02-17 13:13 [PATCH 1/2] static: gpib: hp82341: add MODULE_DESCRIPTION Arnd Bergmann
@ 2025-02-17 13:13 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2025-02-17 13:13 UTC (permalink / raw)
To: Dave Penkler, Greg Kroah-Hartman
Cc: Arnd Bergmann, Dan Carpenter, Nihar Chaithanya, Rohit Chavan,
linux-staging, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
This variable is not referenced in either of these two drivers driver,
causing a warning when they are built-in and W=1 warnings are enabled
with gcc:
drivers/staging/gpib/tnt4882/tnt4882_gpib.c:1507:35: error: 'tnt4882_pnp_table' defined but not used [-Werror=unused-const-variable=]
1507 | static const struct pnp_device_id tnt4882_pnp_table[] = {
| ^~~~~~~~~~~~~~~~~
drivers/staging/gpib/hp_82341/hp_82341.c:811:35: error: 'hp_82341_pnp_table' defined but not used [-Werror=unused-const-variable=]
811 | static const struct pnp_device_id hp_82341_pnp_table[] = {
The MODULE_DEVICE_TABLE() entry does have the effect of loading
the module when the PNP device is detected, so it is still needed
for the modular case.
Ideally the drivers should be converted to pnp_register_driver(),
which would lead to the ID table actually being used.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/gpib/hp_82341/hp_82341.c | 3 +++
drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/drivers/staging/gpib/hp_82341/hp_82341.c b/drivers/staging/gpib/hp_82341/hp_82341.c
index cf5cd1edc41d..72a91228ea36 100644
--- a/drivers/staging/gpib/hp_82341/hp_82341.c
+++ b/drivers/staging/gpib/hp_82341/hp_82341.c
@@ -809,11 +809,14 @@ static void hp_82341_detach(gpib_board_t *board)
hp_82341_free_private(board);
}
+#if 0
+/* unused, will be needed when the driver is turned into a pnp_driver */
static const struct pnp_device_id hp_82341_pnp_table[] = {
{.id = "HWP1411"},
{.id = ""}
};
MODULE_DEVICE_TABLE(pnp, hp_82341_pnp_table);
+#endif
static int __init hp_82341_init_module(void)
{
diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
index 2e1c3cbebaca..df92e9959fe1 100644
--- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
+++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
@@ -1390,11 +1390,14 @@ static struct pci_driver tnt4882_pci_driver = {
.probe = &tnt4882_pci_probe
};
+#if 0
+/* unused, will be needed when the driver is turned into a pnp_driver */
static const struct pnp_device_id tnt4882_pnp_table[] = {
{.id = "NICC601"},
{.id = ""}
};
MODULE_DEVICE_TABLE(pnp, tnt4882_pnp_table);
+#endif
#ifdef GPIB_PCMCIA
static gpib_interface_t ni_pcmcia_interface;
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-17 13:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-17 13:13 [PATCH 1/2] static: gpib: hp82341: add MODULE_DESCRIPTION Arnd Bergmann
2025-02-17 13:13 ` [PATCH 2/2] [v2] staging: gpib: comment out pnp_device_id tables Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.