Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: "Uwe Kleine-König (The Capable Hub)"
	<u.kleine-koenig@baylibre.com>,
	"Niklas Cassel" <cassel@kernel.org>,
	"Mikael Pettersson" <mikpelinux@gmail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] ata: Use named initializers for pci_device_id arrays
Date: Fri, 12 Jun 2026 20:53:38 +0900	[thread overview]
Message-ID: <78750170-1bc9-4e3e-a7e9-460f388b9ef4@kernel.org> (raw)
In-Reply-To: <616e527a0c6cd367f3301438501d8345b0675df1.1781252168.git.ukleinek@kernel.org>

On 6/12/26 17:21, Uwe Kleine-König (The Capable Hub) wrote:
> While being less compact, using named initializers allows to more easily
> see which members of the structs are assigned which value without having
> to lookup the declaration of the struct. And it's also more robust
> against changes to the struct definition.
> 
> The mentioned robustness is relevant for a planned change to struct
> pci_device_id that replaces .driver_data by an anonymous union.
> 
> Also drop the comma after a few list terminators.
> 
> This patch doesn't modify the compiled array, only their 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>

Nice !

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2026-06-12 11:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12  8:21 [PATCH v3 0/2] ata: Consistently define pci_device_ids using named initializers Uwe Kleine-König (The Capable Hub)
2026-06-12  8:21 ` [PATCH v3 1/2] ata: Drop unused assignments of pci_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-06-12  8:21 ` [PATCH v3 2/2] ata: Use named initializers for pci_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-06-12 11:53   ` Damien Le Moal [this message]
2026-06-12 15:29   ` David Laight
2026-06-12 18:03     ` Niklas Cassel
2026-06-12 11:01 ` [PATCH v3 0/2] ata: Consistently define pci_device_ids using named initializers Niklas Cassel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=78750170-1bc9-4e3e-a7e9-460f388b9ef4@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=cassel@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpelinux@gmail.com \
    --cc=u.kleine-koenig@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox