From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
To: Lee Jones <lee@kernel.org>
Cc: Peter Tyser <ptyser@xes-inc.com>,
linux-kernel@vger.kernel.org,
Markus Schneider-Pargmann <msp@baylibre.com>
Subject: Re: [PATCH] mfd: Consistently define pci_device_ids using named initializers
Date: Wed, 29 Apr 2026 23:25:15 +0200 [thread overview]
Message-ID: <afJ2qLd4Whv0pL9H@monoceros> (raw)
In-Reply-To: <20260429170652.4178050-2-u.kleine-koenig@baylibre.com>
[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]
Hello,
On Wed, Apr 29, 2026 at 07:06:51PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> The various struct pci_device_id arrays were initialized mostly by one
> of the PCI_DEVICE macros and then list expressions. The latter isn't
> easily readable if you're not into PCI. Using named initializers is more
> explicit and thus easier to parse.
>
> The secret plan is to make struct pci_device_id::driver_data an
> anonymous union (similar to
> https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@baylibre.com/)
> and that requires named initializers. But it's also a nice cleanup on
> its own.
>
> This change doesn't introduce changes to the compiled pci_device_id
> arrays. Tested on x86 and arm64.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> ---
> Hello,
>
> the mentioned follow-up quest allows to do
>
> - { PCI_VDEVICE(INTEL, 0x02a8), .driver_data = (kernel_ulong_t)&spt_uart_info },
> + { PCI_VDEVICE(INTEL, 0x02a8), .driver_data_ptr = &spt_uart_info },
>
> which gets rid of a bunch of casts and so brings a little bit more type
> safety. This patch is a preparation for that.
>
> I assume a single patch for all of drivers/mfc is fine. If not I can
> split per driver.
Oh, it seems I got my mailtracking wrong and sent this patch twice with
only slightly changed commit log. The commit log of this one is slightly
better, but if you pick the other one that's fine, too.
Sorry for the confusion,
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-04-29 21:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 17:06 Uwe Kleine-König (The Capable Hub)
2026-04-29 21:25 ` Uwe Kleine-König (The Capable Hub) [this message]
2026-05-07 15:12 ` (subset) " Lee Jones
-- strict thread matches above, loose matches on Subject: below --
2026-04-28 15:03 Uwe Kleine-König (The Capable Hub)
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=afJ2qLd4Whv0pL9H@monoceros \
--to=u.kleine-koenig@baylibre.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=msp@baylibre.com \
--cc=ptyser@xes-inc.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
all inboxes | Powered by JetHome®