From nobody Sun Jun 14 01:36:54 2026 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 B826B392C32 for ; Mon, 4 May 2026 15:57:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777910247; cv=none; b=AyAXATvgcBZH9Zembe+Y55+ILM7X8BJN45pI4sBSQuWOm8tSmpSE73bOmUDibG2RZFDfts33o9Yu2PnmY0ljS38STwAnYJDWCHIS50ubHMkjy3AY+1OqeNcIt42BY/gc1GPXzzMgu7pc/mXT6ibru02NNQMi5clnaYaOCjPZ0Lc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777910247; c=relaxed/simple; bh=YQTwDzMoch3FsHsOiYxOTkInHODCHpyt90w8OcJXVO4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=SCHv1R9Il0ZdufHi0vMMLKWzkP1XFR1MgPptVwshJ3aTZFMtMRycbLeGmryiGwfuw4LqxFNej71xuZpR5ni0fUcET/BG0waX5dhwdAcH9MpiI2R6cGKXxotkKr1iPFEbpdDCHvPsZNhtXJsupAzqeE6vyYVQtjNkQ5/0kvnYDDc= 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=viW3Ta5T; arc=none smtp.client-ip=209.85.128.46 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="viW3Ta5T" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-48909558b3aso45800365e9.0 for ; Mon, 04 May 2026 08:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1777910243; x=1778515043; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=njWjyVb6Xw5wyRyuOIjVuE/R43XaQUcsiq3TjqsOaaE=; b=viW3Ta5TEvaIpQ5+xFnXkMnzSexnCTbbdjxwURXuqRSn7b4R6Xw7zLTBk+MRdYktSn +kdJS4Z3pyJrvds7xsP7Nv3Dzjfo0CLBzF2Dk96p7KoDksLPtJ0kgWm8zO1v0dmFo+6S W2/JnloIInMj5wD4p1KFU2SjZpGP8QDWLyROkiVVEnCLT58Up9SDtrpzGlmno5FXuyRV UKpzhqAHQpXkl2idWlGlR10+2W6jPStgVsmgBTPrQ4qY8jzhbR7zK5h3iB43luZptu84 p//+6A8fseUQeHMzBvBtOm2HVI8zRUpTR73qbUxQ6zLookDIP9wkoCuZo5IwnoK+gUH1 LFrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777910243; x=1778515043; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=njWjyVb6Xw5wyRyuOIjVuE/R43XaQUcsiq3TjqsOaaE=; b=o4xKmylT09jAawsJDIsLGLhmWvs7Au9DbCXRZri93c0w98RdheJhBI8DbJXiIGaL5n Ja/evmd1zy+kZei2hj+SFg5Mw355ip5hJlriV5Deduu/4hFB1QCIy7ZF0HIPY5gsoCfu ZKiqi6lp0rrnrP5HtnYAj/iUka/ysVdAjVfnEy3ro3NxUIGE9QW69cNyLJov7WwXeoKV wQIZSdxSc+Q7M8BRMXY9lhL8wzWySBiMZrkFdIMJPyx+sus2tjjFRQlE5k9BWAQRWz1W FuQ0wCVeddKKy+WMtIfrbadiETFLkVi6QX6oXhjSaEUnci+OI5UVnkIfiHDHLF/5+x2X QQZw== X-Forwarded-Encrypted: i=1; AFNElJ9Xs1r3ecBtLR76c+BCnsyj2WrgXwDMx/0Ll55vmezfVxJPmmRhIg4Jqy9la7yuDkoBfrY7xeu3H3sZKGg=@vger.kernel.org X-Gm-Message-State: AOJu0Yyye67Wn1h76oZYngnQhEXPL/rxltSSVe0j8fRimsG60LHXusdz t4CY9/xn9Nh3JHkuugMIsDk9SjHAVMtSIwj0ooP9AuXRZIaDQJ26Za64CSlbyRjcwVM= X-Gm-Gg: AeBDievJQvUGnX7K4CJOewSu1B89rtZpjapQsiwADlwNhy2tcEMOq295E8seZ02TqDi R3z83+vQWR+FknOi7pOUwCNGr2EJ/QpCCPjqQRjyGI1XcFl4IrEf23pbQALAOBZLaig3WyIf8wi nOUHeUzePW2O7mlJeqssEQFGMIiohcF/PWFlEstphrJf307rXf8DmeG8e2yakoTROvZVRtDu41i 8yAh7dI9cpp2Q9VVh0MtowFps1YCz8BwlQXk/QLEN7olhcPMcvzSjYf2sKBnMgCpCvETshb1/k1 JBYnZ8h65JA/keYK1wjifBWgq2qzxAXFe6T4wwu41sDRqFxqN71/guA4fSDAzufwd5D9zgG+qAw t/5D5G/ywMOS0G/f1fGLxSjQ5/IwdutprtHk615WCS5+Fe/+Ay99hzWjQULl8IIPNE7Rsae0dF6 eNG1TVpp6cIG6cpVWHdl7mK+0kzy/Eap3MmblWyeMLeUJObSvfld9d/KvdwNyl5ds3LDzCcTX5G sZgnJGeQerxsUTsxm0RkX/Q/Q== X-Received: by 2002:a05:600c:8b01:b0:488:ab26:8fe0 with SMTP id 5b1f17b1804b1-48a9865d987mr179444575e9.15.1777910243142; Mon, 04 May 2026 08:57:23 -0700 (PDT) Received: from localhost (p200300f65f114e08197264a4bf9e813f.dip0.t-ipconnect.de. [2003:f6:5f11:4e08:1972:64a4:bf9e:813f]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-48a820c8556sm330774105e9.4.2026.05.04.08.57.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2026 08:57:22 -0700 (PDT) From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=29?= To: Arnd Bergmann , Greg Kroah-Hartman Cc: Markus Schneider-Pargmann , Matthew Schwartz , Ricky Wu , Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH] misc: rtsx: Use named initializers for struct pci_device_id Date: Mon, 4 May 2026 17:57:15 +0200 Message-ID: <20260504155715.2163032-2-u.kleine-koenig@baylibre.com> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=3612; i=u.kleine-koenig@baylibre.com; h=from:subject; bh=YQTwDzMoch3FsHsOiYxOTkInHODCHpyt90w8OcJXVO4=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBp+MHbmrohLoHQBxX381TU/DObx+vW5xGF+RK8D JLLHe0+rY+JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCafjB2wAKCRCPgPtYfRL+ TqVOCAC7sI7le4FDsXK5HZ6ZwKTfXdf82MCXBkdcYMC5PUN2xBFlkk8gO0U2wwqElAWQh6As82g 42e0QJNRarzZKbm8whL6VegDxmFeFPlF92npNGeO0zp2/XX5vdk/KcLDypTyKzS4pLhWpasnbTL /g/WiY02DBTTJy/16X4SMnkjtYWXU4/VabVzx6s9joSp7cL2ku9KiYu9EcIma1IDfcxFl6BK/OH u6vYXhkDfR65tUObXn1ngrGFH/NE3BSHRl+8mpbtoGgYgOrKugIwLSIgVHddxm+OWFFuPW7WyEM ecIpaYh7hVNJQFU10Ht8uytBMsyA5SJ5zTp7JHqBYc0kuZUb X-Developer-Key: i=u.kleine-koenig@baylibre.com; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable Initializing structures using list initializers is harder to read than using named initializers. Seeing the member name is more ideomatic and easier to understand. Use named initializers for the driver's pci_device_id array. While at it also drop an explicit zero in the terminating array entry. There are no changes to the compiled result of the array; verified with builds for x86 and arm64. Signed-off-by: Uwe Kleine-K=C3=B6nig (The Capable Hub) --- Hello, this patch is part of a quest replacing .driver_data in struct pci_device_id by an anonymous union. Technically this patch isn't needed for what I want to do, but this driver matched my grep pattern so I adapted it, too. Best regards Uwe drivers/misc/cardreader/rtsx_pcr.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/r= tsx_pcr.c index 2b6a994c6fe1..c4d54ca2fa80 100644 --- a/drivers/misc/cardreader/rtsx_pcr.c +++ b/drivers/misc/cardreader/rtsx_pcr.c @@ -42,21 +42,21 @@ static struct mfd_cell rtsx_pcr_cells[] =3D { }; =20 static const struct pci_device_id rtsx_pci_ids[] =3D { - { PCI_DEVICE(0x10EC, 0x5209), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x5229), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x5289), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x5227), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x522A), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x5249), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x5287), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x5286), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x524A), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x525A), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x5260), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x5261), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x5228), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { PCI_DEVICE(0x10EC, 0x5264), PCI_CLASS_OTHERS << 16, 0xFF0000 }, - { 0, } + { PCI_DEVICE(0x10EC, 0x5209), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x5229), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x5289), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x5227), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x522A), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x5249), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x5287), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x5286), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x524A), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x525A), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x5260), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x5261), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x5228), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x5264), .class =3D PCI_CLASS_OTHERS << 16, .class_m= ask =3D 0xFF0000 }, + { } }; =20 MODULE_DEVICE_TABLE(pci, rtsx_pci_ids); base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731 --=20 2.47.3