* [PATCH v1] scsi: Improve style of pnp_device_id array terminator
@ 2026-06-10 14:36 Uwe Kleine-König (The Capable Hub)
2026-06-10 15:46 ` John Garry
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-06-10 14:36 UTC (permalink / raw)
To: James E.J. Bottomley, Martin K. Petersen, Finn Thain,
Michael Schmitz
Cc: linux-scsi, linux-kernel
To match how device-id array terminators look like for other device
types drop `.id = ""` from it and let the compiler care for zeroing the
entry.
There are no changes in the compiled drivers, only the source looks
nicer.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
Hello,
I'm currently working on changing various *_device_id definitions.
This patch is irrelevant for this quest and a pure style update for
consistency reasons without further dependencies on it. I just stumbled
over this while working on that quest.
So if you don't like this patch, I won't insist.
Best regards
Uwe
drivers/scsi/aha1542.c | 2 +-
drivers/scsi/g_NCR5380.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index fd766282d4a4..93dab19c1cb9 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -1083,7 +1083,7 @@ static int isa_registered;
#ifdef CONFIG_PNP
static const struct pnp_device_id aha1542_pnp_ids[] = {
{ .id = "ADP1542" },
- { .id = "" }
+ { }
};
MODULE_DEVICE_TABLE(pnp, aha1542_pnp_ids);
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index 270eae7ac427..41731a7304dd 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -739,7 +739,7 @@ static struct isa_driver generic_NCR5380_isa_driver = {
#ifdef CONFIG_PNP
static const struct pnp_device_id generic_NCR5380_pnp_ids[] = {
{ .id = "DTC436e", .driver_data = BOARD_DTC3181E },
- { .id = "" }
+ { }
};
MODULE_DEVICE_TABLE(pnp, generic_NCR5380_pnp_ids);
base-commit: 49e02880ec0a8c378e811bc9d85da188d7c6204c
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] scsi: Improve style of pnp_device_id array terminator
2026-06-10 14:36 [PATCH v1] scsi: Improve style of pnp_device_id array terminator Uwe Kleine-König (The Capable Hub)
@ 2026-06-10 15:46 ` John Garry
2026-06-10 20:56 ` Uwe Kleine-König (The Capable Hub)
2026-06-10 16:19 ` Bart Van Assche
2026-07-12 19:25 ` Martin K. Petersen
2 siblings, 1 reply; 5+ messages in thread
From: John Garry @ 2026-06-10 15:46 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub), James E.J. Bottomley,
Martin K. Petersen, Finn Thain, Michael Schmitz
Cc: linux-scsi, linux-kernel
On 10/06/2026 15:36, Uwe Kleine-König (The Capable Hub) wrote:
> To match how device-id array terminators look like for other device
> types drop `.id = ""` from it and let the compiler care for zeroing the
> entry.
>
> There are no changes in the compiled drivers, only the source looks
> nicer.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> ---
> Hello,
>
> I'm currently working on changing various *_device_id definitions.
> This patch is irrelevant for this quest and a pure style update for
> consistency reasons without further dependencies on it. I just stumbled
> over this while working on that quest.
>
> So if you don't like this patch, I won't insist.
>
> Best regards
> Uwe
>
> drivers/scsi/aha1542.c | 2 +-
> drivers/scsi/g_NCR5380.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
> index fd766282d4a4..93dab19c1cb9 100644
> --- a/drivers/scsi/aha1542.c
> +++ b/drivers/scsi/aha1542.c
> @@ -1083,7 +1083,7 @@ static int isa_registered;
> #ifdef CONFIG_PNP
> static const struct pnp_device_id aha1542_pnp_ids[] = {
> { .id = "ADP1542" },
> - { .id = "" }
It seems to be standard practice to use { .id = "" } as pnp dev table
sentinel - so why change? Are they all going to be changed?
> + { }
> };
> MODULE_DEVICE_TABLE(pnp, aha1542_pnp_ids);
>
> diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
> index 270eae7ac427..41731a7304dd 100644
> --- a/drivers/scsi/g_NCR5380.c
> +++ b/drivers/scsi/g_NCR5380.c
> @@ -739,7 +739,7 @@ static struct isa_driver generic_NCR5380_isa_driver = {
> #ifdef CONFIG_PNP
> static const struct pnp_device_id generic_NCR5380_pnp_ids[] = {
> { .id = "DTC436e", .driver_data = BOARD_DTC3181E },
> - { .id = "" }
> + { }
> };
> MODULE_DEVICE_TABLE(pnp, generic_NCR5380_pnp_ids);
>
>
> base-commit: 49e02880ec0a8c378e811bc9d85da188d7c6204c
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] scsi: Improve style of pnp_device_id array terminator
2026-06-10 14:36 [PATCH v1] scsi: Improve style of pnp_device_id array terminator Uwe Kleine-König (The Capable Hub)
2026-06-10 15:46 ` John Garry
@ 2026-06-10 16:19 ` Bart Van Assche
2026-07-12 19:25 ` Martin K. Petersen
2 siblings, 0 replies; 5+ messages in thread
From: Bart Van Assche @ 2026-06-10 16:19 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub), James E.J. Bottomley,
Martin K. Petersen, Finn Thain, Michael Schmitz
Cc: linux-scsi, linux-kernel
On 6/10/26 7:36 AM, Uwe Kleine-König (The Capable Hub) wrote:
> diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
> index fd766282d4a4..93dab19c1cb9 100644
> --- a/drivers/scsi/aha1542.c
> +++ b/drivers/scsi/aha1542.c
> @@ -1083,7 +1083,7 @@ static int isa_registered;
> #ifdef CONFIG_PNP
> static const struct pnp_device_id aha1542_pnp_ids[] = {
> { .id = "ADP1542" },
> - { .id = "" }
> + { }
> };
> MODULE_DEVICE_TABLE(pnp, aha1542_pnp_ids);
>
> diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
> index 270eae7ac427..41731a7304dd 100644
> --- a/drivers/scsi/g_NCR5380.c
> +++ b/drivers/scsi/g_NCR5380.c
> @@ -739,7 +739,7 @@ static struct isa_driver generic_NCR5380_isa_driver = {
> #ifdef CONFIG_PNP
> static const struct pnp_device_id generic_NCR5380_pnp_ids[] = {
> { .id = "DTC436e", .driver_data = BOARD_DTC3181E },
> - { .id = "" }
> + { }
> };
> MODULE_DEVICE_TABLE(pnp, generic_NCR5380_pnp_ids);
Although in general I'm not a fan of code cleanups for legacy drivers, I
like this change. Hence:
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] scsi: Improve style of pnp_device_id array terminator
2026-06-10 15:46 ` John Garry
@ 2026-06-10 20:56 ` Uwe Kleine-König (The Capable Hub)
0 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-06-10 20:56 UTC (permalink / raw)
To: John Garry
Cc: James E.J. Bottomley, Martin K. Petersen, Finn Thain,
Michael Schmitz, linux-scsi, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1965 bytes --]
On Wed, Jun 10, 2026 at 04:46:24PM +0100, John Garry wrote:
> On 10/06/2026 15:36, Uwe Kleine-König (The Capable Hub) wrote:
> > To match how device-id array terminators look like for other device
> > types drop `.id = ""` from it and let the compiler care for zeroing the
> > entry.
> >
> > There are no changes in the compiled drivers, only the source looks
> > nicer.
> >
> > Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> > ---
> > Hello,
> >
> > I'm currently working on changing various *_device_id definitions.
> > This patch is irrelevant for this quest and a pure style update for
> > consistency reasons without further dependencies on it. I just stumbled
> > over this while working on that quest.
> >
> > So if you don't like this patch, I won't insist.
> >
> > Best regards
> > Uwe
> >
> > drivers/scsi/aha1542.c | 2 +-
> > drivers/scsi/g_NCR5380.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
> > index fd766282d4a4..93dab19c1cb9 100644
> > --- a/drivers/scsi/aha1542.c
> > +++ b/drivers/scsi/aha1542.c
> > @@ -1083,7 +1083,7 @@ static int isa_registered;
> > #ifdef CONFIG_PNP
> > static const struct pnp_device_id aha1542_pnp_ids[] = {
> > { .id = "ADP1542" },
> > - { .id = "" }
>
> It seems to be standard practice to use { .id = "" } as pnp dev table
> sentinel - so why change? Are they all going to be changed?
I sent several patches reworking pnp_device_id arrays. Both styles exist
(and also { "", 0 }) and I adapted all arrays I touched to the { } style
matching what is usual for all other *_device_id arrays I saw so far.
And I sent this patch only to create consistency. I think I catched most
instances already, and before declaring the quest done I will make sure
to tackle also those that I now might have missed for now.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] scsi: Improve style of pnp_device_id array terminator
2026-06-10 14:36 [PATCH v1] scsi: Improve style of pnp_device_id array terminator Uwe Kleine-König (The Capable Hub)
2026-06-10 15:46 ` John Garry
2026-06-10 16:19 ` Bart Van Assche
@ 2026-07-12 19:25 ` Martin K. Petersen
2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2026-07-12 19:25 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub)
Cc: James E.J. Bottomley, Martin K. Petersen, Finn Thain,
Michael Schmitz, linux-scsi, linux-kernel
Uwe,
> To match how device-id array terminators look like for other device
> types drop `.id = ""` from it and let the compiler care for zeroing the
> entry.
Applied to 7.3/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-07-12 19:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 14:36 [PATCH v1] scsi: Improve style of pnp_device_id array terminator Uwe Kleine-König (The Capable Hub)
2026-06-10 15:46 ` John Garry
2026-06-10 20:56 ` Uwe Kleine-König (The Capable Hub)
2026-06-10 16:19 ` Bart Van Assche
2026-07-12 19:25 ` Martin K. Petersen
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.