From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA05B175A62 for ; Thu, 7 May 2026 15:17:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778167056; cv=none; b=RozeT9ioxuEPuSDDmALqyExA33oW3BW/mtmBo+a0bqZOG1Wm68ZOQ4u6Lx7jABKF5kwOr4fKEwkQJE6W9tYQo2hInNU7mppTQdjG6LcqThJwN94CireWGFKbDMRhZkskvOawKJMroWDL6F3sOth57cL7H2Lbsl7lYTBu7enxrtM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778167056; c=relaxed/simple; bh=s2Y6crHhQtbrRlKDgiV1zzNU5maBZtrtcgvCG9yW5cc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DOybMRQINGwplN3DdvcG2Jl7hbJozVHw/SM+zp9NDR7QGv8dilmLyJfGgAhUORQWiwewl7/vRmCBiqOJR5sjG7dHyMsC/vp9zeKZlG0U3cAHVe5RPimj2twrzWKISLQlfBPlrZq8nmT7AFXgKUrzMhjg0hrB3qc0YtNKL/EoRpA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.b=Y3m5vROw; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.b="Y3m5vROw" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-48374014a77so11877745e9.3 for ; Thu, 07 May 2026 08:17:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1778167052; x=1778771852; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=4rlI5zRIoDjrlR29qqvXhURJNizOZ5M9DgcKCaVPG20=; b=Y3m5vROwBh2Eqtp0UUw0fK+NyIM7BrlJl1LnahhWIFn4BNg3sj9xscWp93xkaTZ4Qc Efn6HsuvEvrzoVNVLEwdaRSqh3Z9vWaNaftZcJcDXk2tqeiMoWriGBMFnbypfYl+EsSJ vZQpX+l3LJQ5IWZoytgwF0d+veWjz7qrNdUpKih/pBf+OGwSXO2mZopb9h/YpMwA51em 75AeOlPL7FnW6jIePeyPETN9z8vz2iwryhGd/DS7tUn62k1AbOrP8CYmmA0vfZVe40Ga ANCl2lhOC4GZriScc6UfMlQzY7GRnq5/EY9YUuvDPY7+Tby9MScXQz+5F8AkDFDOJ2Ap 4iAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778167052; x=1778771852; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4rlI5zRIoDjrlR29qqvXhURJNizOZ5M9DgcKCaVPG20=; b=G0BVGQygd84EaOg0mkVlzaJiM1YFiEdw3uh2/jFB0TYAKP1/Y6SSe0I6IjuZrubQB6 SyAymQw3e7S5OQf0fkJHj5erK7LCQmyJeJS+NiIID3h9Ig/v/5zmanUT35BOJdYYSY6p wWeeqnIBP/Y8tFsqTebQ8cygCC/itUBncef4DVtJcxDqAchATjNg/xjWydifLRv9snNJ /NgwBqFE1Hz/jK8DtFXXC0LRh3iqZxuXVokOI7kLLXVxvuBnQcsoiWkicNoWm/0++Pns VRWgUQH+WyKLvREzMkFHMFoStUyi8UGbyFiXFfD5VW+DMsskmxpmatT9fyrC/9dITvrO XsEQ== X-Forwarded-Encrypted: i=1; AFNElJ9FirE+gf+gtLxekogySt089n5rHMidGcFhiVvFuTCoXaxELDq6gr7l+Un6F/rKUqP/ohg3E5Ar3RxCI24=@vger.kernel.org X-Gm-Message-State: AOJu0Yx8fUiWCWQqDQ9Zb/xIz3YVbQPgglk5bp20P9iRWOCDfDDOD/4A hVTS5bNtW9ZnRxKXCXMPt36UVyRz5iJ3SAcah7elrPcTu7wSBGe6Lp+Y9dTHJc47Cio= X-Gm-Gg: AeBDievMV33ZgtYgeGoTwsvKkbXptX0XepLb2hBD/TEoDjfMHApBhqjcYWdDM2GPmaX FCB7tqNFBrFUIHZr76qJ207vjfG30IBwl47A9Yn69PYlNWCkeddZTupA/dkMkcK7gDgGLP7H3fg lBCkfeV3GSzu2mxkLbhc2X40TZKxbDoGZf7VMBZ7XAjc8HmgCTxC6FFJnYSaENlcfmM64s/oSYr BhOs4uMUEwZy7bncqZJknsxkm6IeXnh/2viW6IGSRVJmy4FSfY/Q93ia0WwUnKrbH/VhGrctA5M iHFzqMfRd54XsnA2QxZ/5ouJP0xfTlzI1FuZC/bUAOvJ25mClR3XcwjLXT9GiUhTUxWm+CQ0Ucn PscA2RN9D9ZywQFxxD0XOAno/MrgTlcfru61pwwscy4y145JKTuWM/RRnx12CBJouc1fA40Lj99 x16Miz+btffyrF+/xrFgfK1ZJ/Et88hTsZ1ByIUzIjXLUY5UsHF89NIWQG9aJMTCf9vHolj7IHI qQ1pzaCZKTEHiErQFj+vBRcIw== X-Received: by 2002:a05:600c:3e8d:b0:488:bc6a:528d with SMTP id 5b1f17b1804b1-48e51f40b12mr145712015e9.22.1778167052008; Thu, 07 May 2026 08:17:32 -0700 (PDT) Received: from localhost (p200300f65f114e08e9fd60f450b139aa.dip0.t-ipconnect.de. [2003:f6:5f11:4e08:e9fd:60f4:50b1:39aa]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-48e530c1d07sm41001755e9.9.2026.05.07.08.17.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2026 08:17:31 -0700 (PDT) Date: Thu, 7 May 2026 17:17:30 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig_=28The_Capable_Hub=29?= To: Mauro Carvalho Chehab Cc: Hans Verkuil , Andy Walls , Markus Schneider-Pargmann , Yong Zhi , Sakari Ailus , Dan Scally , Martin Tuma , Abylay Ospan , Bluecherry Maintainers , Ismael Luceno , Ezequiel Garcia , Corentin Labbe , Ingo Molnar , Laurent Pinchart , Jai Luthra , Kees Cook , Bradford Love , Atharv Dubey , Haoxiang Li , Sean Young , Patrice Chotard , 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 Message-ID: References: <20260506174412.2606010-2-u.kleine-koenig@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="g75pm3ww6reiqzz7" Content-Disposition: inline In-Reply-To: <20260506174412.2606010-2-u.kleine-koenig@baylibre.com> --g75pm3ww6reiqzz7 Content-Type: text/plain; protected-headers=v1; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH] media: pci: Use PCI_DEVICE macros and drop zeros from pci_device_id arrays MIME-Version: 1.0 Hello, On Wed, May 06, 2026 at 07:44:12PM +0200, Uwe Kleine-K=F6nig (The Capable H= ub) 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. >=20 > There are no changes introduced by this commit to the compiled arrays for > ARCH=3Dx86 and ARCH=3Darm64 builds. >=20 > Signed-off-by: Uwe Kleine-K=F6nig (The Capable Hub) > --- > Hello, >=20 > 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= =2Ecom/). > 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. >=20 > I put all changes in a single patch, if you prefer it being split I can d= o 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/saa7= 146.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 */ }; =20 -#define MAKE_EXTENSION_PCI(x_var, x_vendor, x_device) \ - { \ - .vendor =3D PCI_VENDOR_ID_PHILIPS, \ - .device =3D PCI_DEVICE_ID_PHILIPS_SAA7146, \ - .subvendor =3D x_vendor, \ - .subdevice =3D x_device, \ - .driver_data =3D (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_d= evice)),\ + .driver_data =3D (unsigned long)&(x_var), \ } =20 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 =3D &(x_var), (or if you apply this version, feel free to squash the diff into the commit). Best regards Uwe --g75pm3ww6reiqzz7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmn8rQcACgkQj4D7WH0S /k4cbwf/XHootzTV2dhXqXjfIYmwScfZDuXhC38cQlxVyoIlhSgTqnzIftlcdZzB ORcP5144p3lUqXTTPW8J8BJzmXJbC0W0ntqQjr796pGP13R8oSOScBfG4Cr93SH0 AIGPzXGluScUNpGnhZfsU0yKaE62n0J5CHPDanLIpG4o0PwnRscgK7gR1TbsIvP9 Ph3ao4z/ctecuaGBQUth0WbYzYwO7RUZSWdvqocIbgEq+RU5kPSEE9xwG4/ML+Za EYlKuZwEQl2CnbM9pmT7eIcn9RmzVHCBL+KsO5wWKRRbRECKboQ4yEhFpRpT+CXh 2U0+ECHorGmEYceB/zv5vmVxpXYJfg== =m8GL -----END PGP SIGNATURE----- --g75pm3ww6reiqzz7--