From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Hans Verkuil <hverkuil@kernel.org>,
Andy Walls <awalls@md.metrocast.net>,
Markus Schneider-Pargmann <msp@baylibre.com>,
Yong Zhi <yong.zhi@intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Dan Scally <dan.scally@ideasonboard.com>,
Martin Tuma <martin.tuma@digiteqautomotive.com>,
Abylay Ospan <aospan@amazon.com>,
Bluecherry Maintainers <maintainers@bluecherrydvr.com>,
Ismael Luceno <ismael@iodev.co.uk>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
Corentin Labbe <clabbe@baylibre.com>,
Ingo Molnar <mingo@kernel.org>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Jai Luthra <jai.luthra@linux.dev>, Kees Cook <kees@kernel.org>,
Bradford Love <brad@nextdimension.cc>,
Atharv Dubey <atharvd440@gmail.com>,
Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>,
Sean Young <sean@mess.org>,
Patrice Chotard <patrice.chotard@foss.st.com>,
Wang Jun <1742789905@qq.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
mjpeg-users@lists.sourceforge.net
Subject: Re: [PATCH] media: pci: Use PCI_DEVICE macros and drop zeros from pci_device_id arrays
Date: Thu, 7 May 2026 17:17:30 +0200 [thread overview]
Message-ID: <afysRvNhUCW75YiB@monoceros> (raw)
In-Reply-To: <20260506174412.2606010-2-u.kleine-koenig@baylibre.com>
[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]
Hello,
On Wed, May 06, 2026 at 07:44:12PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> Some pci_device_id arrays already used the PCI_DEVICE macros, others
> used named initializers or list initializers. Unify all to use the
> PCI_DEVICE macros and (if applicable) a named initializer for
> .driver_data. Also drop all zeros that the compiler can care for and
> unify indention and spacing.
>
> There are no changes introduced by this commit to the compiled arrays for
> ARCH=x86 and ARCH=arm64 builds.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> ---
> Hello,
>
> this is a preparing change for making struct pci_device_id::driver_data
> an anonymous union (similar to
> https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@baylibre.com/).
> This requires named initializers for .driver_data. Not all changes here
> are required for that, but I expanded the quest to unify a bit more than
> necessary.
>
> I put all changes in a single patch, if you prefer it being split I can do that.
I just noticed I failed to put the following hunk into the patch:
diff --git a/include/media/drv-intf/saa7146.h b/include/media/drv-intf/saa7146.h
index 71ce63c99cb4..b8f2fe5680f0 100644
--- a/include/media/drv-intf/saa7146.h
+++ b/include/media/drv-intf/saa7146.h
@@ -77,13 +77,10 @@ struct saa7146_pci_extension_data {
void *ext_priv; /* most likely a name string */
};
-#define MAKE_EXTENSION_PCI(x_var, x_vendor, x_device) \
- { \
- .vendor = PCI_VENDOR_ID_PHILIPS, \
- .device = PCI_DEVICE_ID_PHILIPS_SAA7146, \
- .subvendor = x_vendor, \
- .subdevice = x_device, \
- .driver_data = (unsigned long)& x_var, \
+#define MAKE_EXTENSION_PCI(x_var, x_vendor, x_device) \
+ { \
+ PCI_VDEVICE_SUB(PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA7146, (x_vendor), (x_device)),\
+ .driver_data = (unsigned long)&(x_var), \
}
struct saa7146_extension
but that's not urgent as the current definition of MAKE_EXTENSION_PCI()
is good enough to not block the next step of my quest. I'll address that
in a v2 (if it comes to that) or later together with the next step
making the driver_data line:
.driver_data_ptr = &(x_var),
(or if you apply this version, feel free to squash the diff into the
commit).
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2026-05-07 15:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 17:44 [PATCH] media: pci: Use PCI_DEVICE macros and drop zeros from pci_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-05-07 15:17 ` Uwe Kleine-König (The Capable Hub) [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=afysRvNhUCW75YiB@monoceros \
--to=u.kleine-koenig@baylibre.com \
--cc=1742789905@qq.com \
--cc=aospan@amazon.com \
--cc=atharvd440@gmail.com \
--cc=awalls@md.metrocast.net \
--cc=brad@nextdimension.cc \
--cc=clabbe@baylibre.com \
--cc=dan.scally@ideasonboard.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=hverkuil@kernel.org \
--cc=ismael@iodev.co.uk \
--cc=jai.luthra@linux.dev \
--cc=kees@kernel.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=lihaoxiang@isrc.iscas.ac.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=maintainers@bluecherrydvr.com \
--cc=martin.tuma@digiteqautomotive.com \
--cc=mchehab@kernel.org \
--cc=mingo@kernel.org \
--cc=mjpeg-users@lists.sourceforge.net \
--cc=msp@baylibre.com \
--cc=patrice.chotard@foss.st.com \
--cc=sakari.ailus@linux.intel.com \
--cc=sean@mess.org \
--cc=yong.zhi@intel.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