Re: [PATCH v1] scsi: Improve style of pnp_device_id array terminator

From: Uwe Kleine-König (The Capable Hub)

Date: Wed Jun 10 2026 - 16:56:57 EST


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@xxxxxxxxxxxx>
> > ---
> > 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: signature.asc
Description: PGP signature