Linux block layer
 help / color / mirror / Atom feed
* [PATCH v1] floppy: Drop unused pnp driver data
@ 2026-06-10  7:27 Uwe Kleine-König (The Capable Hub)
  2026-06-10 10:59 ` Denis Efremov (Oracle)
  2026-06-10 12:28 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-06-10  7:27 UTC (permalink / raw)
  To: Denis Efremov, Jens Axboe; +Cc: linux-block, linux-kernel

The pnp_device_id array is only used for module data to support
auto-loading the floppy module. So the .driver_data member is unused and
this assignment can be dropped.

While touching that array, align the coding style to what is used most
for these.

This patch doesn't modify the compiled array, only its representation
in source form benefits. The former was confirmed with x86 and arm64
builds.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
Hello,

I intend to change struct pnp_device_id and for that it's required that
.driver_data is not assigned using a list initializer. Instead of
converting it to a named initializer, drop the assignment as the value
is unused. So this is both a cleanup and a preparation for a later patch
series.

See
https://lore.kernel.org/all/cover.1779878004.git.u.kleine-koenig@baylibre.com/
for a more verbose description on the mentioned change to struct
pnp_device_id (though this is about platform_device_id, but the idea
here is the same).

Best regards
Uwe

 drivers/block/floppy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 0509746f8aed..dca495be0683 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -5012,8 +5012,8 @@ MODULE_LICENSE("GPL");
 
 /* This doesn't actually get used other than for module information */
 static const struct pnp_device_id floppy_pnpids[] = {
-	{"PNP0700", 0},
-	{}
+	{ .id = "PNP0700" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(pnp, floppy_pnpids);

base-commit: 49e02880ec0a8c378e811bc9d85da188d7c6204c
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-10 12:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10  7:27 [PATCH v1] floppy: Drop unused pnp driver data Uwe Kleine-König (The Capable Hub)
2026-06-10 10:59 ` Denis Efremov (Oracle)
2026-06-10 12:28 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox