From: Takashi Iwai <tiwai@suse.de>
To: "\"Uwe Kleine-König (The Capable Hub)\"" <u.kleine-koenig@baylibre.com>
Cc: "Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
"Kees Cook" <kees@kernel.org>,
"Cássio Gabriel" <cassiogabrielcontato@gmail.com>,
"Jihed Chaibi" <jihed.chaibi.dev@gmail.com>,
"Pengpeng Hou" <pengpeng@iscas.ac.cn>,
"Chandra Mohan Sundar" <chandramohan.explore@gmail.com>,
"Thorsten Blum" <thorsten.blum@linux.dev>,
"Wentao Liang" <vulab@iscas.ac.cn>,
"Julia Lawall" <Julia.Lawall@inria.fr>,
"Alok Tiwari" <alok.a.tiwari@oracle.com>,
tanze <tanze@kylinos.cn>,
"Dan Carpenter" <dan.carpenter@linaro.org>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
"Markus Schneider-Pargmann" <msp@baylibre.com>
Subject: Re: [PATCH] ALSA: Consistently define pci_device_ids using named initializers
Date: Mon, 04 May 2026 13:24:03 +0200 [thread overview]
Message-ID: <871pfrzacs.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260430135255.279393-2-u.kleine-koenig@baylibre.com>
On Thu, 30 Apr 2026 15:52:53 +0200,
Uwe Kleine-König (The Capable Hub) wrote:
>
> ... and PCI device helpers.
>
> The various struct pci_device_id arrays were initialized mostly by list
> expressions, some of them using the PCI_DEVICE macros. This isn't easily
> readable if you're not into PCI. Using named initializers is more
> explicit and thus easier to parse. Also use PCI_DEVICE* helper macros to
> assign .vendor, .device, .subvendor and .subdevice where appropriate and
> skip explicit assignments of 0 (which the compiler takes care of).
>
> 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
> array. 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_DEVICE_SUB(HPI_PCI_VENDOR_ID_TI, HPI_PCI_DEV_ID_DSP6205,
> HPI_PCI_VENDOR_ID_AUDIOSCIENCE, PCI_ANY_ID),
> - .driver_data = (kernel_ulong_t)HPI_6205,
> + .driver_data_ptr = HPI_6205,
>
> 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 sound is fine. If not please instruct how I
> should split the patch. (per driver?)
As it's a systematic change and no conflict is found, I took to
for-next branch as is now.
thanks,
Takashi
prev parent reply other threads:[~2026-05-04 11:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 13:52 [PATCH] ALSA: Consistently define pci_device_ids using named initializers Uwe Kleine-König (The Capable Hub)
2026-05-04 11:24 ` Takashi Iwai [this message]
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=871pfrzacs.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=Julia.Lawall@inria.fr \
--cc=alok.a.tiwari@oracle.com \
--cc=cassiogabrielcontato@gmail.com \
--cc=chandramohan.explore@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=jihed.chaibi.dev@gmail.com \
--cc=kees@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=msp@baylibre.com \
--cc=pengpeng@iscas.ac.cn \
--cc=perex@perex.cz \
--cc=tanze@kylinos.cn \
--cc=thorsten.blum@linux.dev \
--cc=tiwai@suse.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=vulab@iscas.ac.cn \
/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