From nobody Mon May 25 05:13:12 2026 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 3BE05C2EA for ; Mon, 18 May 2026 13:33:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779111201; cv=none; b=rgA+bPsNUdOY1lH8dTdo3VbFl0sS4LiRCDXYmk6haKLko8hiOXs56q/WSooN1JSpo4m385dMBioAL0/3DWjYjnSGS5064M5rOR0W0KjG+PtmqHbxPTu01iUqZRLZkOD01NSli9p2eGJuiZeaG9HXrOW+VM8xC4p6A5gF3nEnsjM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779111201; c=relaxed/simple; bh=q+NL498EPwlLrfBIQdB3BECdx05b64cjxCXzpG0xTJ0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=UNooa05tnArUpVDuWGpGHUV8f831OSSgytmehfjaZEEmbtnvNXldiz0cL9ubsAo0t2bW9VqkwIlOqfq1/loXmwOHJGr8iedcO0WnaTED8K31fF5RSS3u9+/De4KumMRap5f8kwmrTLMpp7H417xN4qnCgwVXKd7TjvfdzQAMosE= 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=K9ypW/vP; arc=none smtp.client-ip=209.85.221.49 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="K9ypW/vP" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-44e5624c053so1309341f8f.2 for ; Mon, 18 May 2026 06:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1779111198; x=1779715998; 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=BwVMqQgkml/57c5J8ItJqxnkkdNf36+YjPY4g30oVbw=; b=K9ypW/vPEm9WqgHZl5wgy2AW2uUV4yXgFdMLe9heFd970EZZXnrrSMnNj+wRJYifbM 8glk9iOKdEsfCWo6DcTo0GUf6TRBJ9KTLkCnoEOsW3z1JXUSPuqRjuP254HXJG2XMW09 S50BfKTO61KnpUfVJoYIPM8Sv0aVrll9JlWbVH+u4CgFxYfD6edSA5UNITczMs9rbUGN X12VDZfoAnRMt1eCHm+40w+Z3dx+uaBuI3R0wbtx5ezRuC8OupJKhnpywQ7jVakXjlXK Tjl9k7NS9Zm21rVm5QE7aKoBQXIiazayCRVGYWCZj65T+kXI2SlHmsKl2LA2RIgcyte+ 8vNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779111198; x=1779715998; 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=BwVMqQgkml/57c5J8ItJqxnkkdNf36+YjPY4g30oVbw=; b=Jgxtt9ERFRH25yXBk9wgMz/pbPkBBFObWxlIyutsKFya0njlYPxU0Hq68pt3rPaAh+ YWM6wpYu+da5XOsT0c29/zNDlgFakAyrviLoZv4QZI34phSZBwf/3cBUKxq+UXlruNh+ Id+rM+t1ibk/FavJJH0R01ozwbiJrgAtBisFKBkJ/aV/6hP8OC/oS1DC2Bh9M2UnKfmo wKXxWym37nNtRSgc4zL4q1lI+JpqP1AB/e1MS733w/Ls8fkLk/PU9XByzAwuaN0HKcCu SkvOM0iKtBIFML6QwJawhwtHzLeQC3aCcirOBdmgigntgEsvxEhraW9hlE+Bn8ITdML5 nK8Q== X-Forwarded-Encrypted: i=1; AFNElJ+Yo6tuzTeSRGAx0XLgQ2qMsPN6Qtm05bK148iKpwGDVIox4YQ5BqbAmEoNTICTWWVZD0m1q2KndXrUuzQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyeYUzYMQ1CVMhegpYymFHAcTiyTNariJzN/Vyd4j1xzD3a1OPm ISJw7J6XK1vB6RgXTXS1nFabDgszrf7Do0L7bf2LvQ5lQ7Q0cpa0qizilnWgSBLacOY= X-Gm-Gg: Acq92OHYBdigu5g4l+s6GcSNvC558ckWiTAK/o5i4+8PWdEx1FXesCUlVgi4ZHt4qhq t4rxzrZRbvi7Fhh7BgSDmNs0UO5rpP3itAzjvdy7S5S3OiRHlBtVOO46+Jm0fkPYXFXpWJdX+Sm tbQ1PPlUrP+mYLczULZKUvXaGRaGFy/0vwueoxdGsOLscwc+0LD6GkMQNJKm8Pqay9Xvlt+jMyF GAPTel6ab+zfAkSL/+qIOgLqpo80Nd7R0XcROejvteeq11LEM8xqcbVGgd2HdBmCVQjYXox+pdg si6ObnMBkX71Xz+SseDlRsc0IpvdZ2uiCeqFbMH27XAYO7KfoUbPLm9rH4gqwp5lCULVfx/QkH9 Kq7cqW/20s/SCCS4tEcWnYEgymr0CV7LOK7GSBOdlUNY+MnOwz/w5Jy7UWQaidVcA9IUEUzI/mt FdimBr5UdH/a7pq/rxBPjR1Oe2oXeVVD4UIaEG5G9xZKoBp+P8RjAjYLxh1ZfOwEc7BUo4BEI0P RiUp9V1qcMYRA== X-Received: by 2002:a05:600c:3f0f:b0:48f:99a9:bbcc with SMTP id 5b1f17b1804b1-48fe60ecb9cmr214543795e9.10.1779111197564; Mon, 18 May 2026 06:33:17 -0700 (PDT) Received: from localhost (p200300f65f47db04e77777300859e43d.dip0.t-ipconnect.de. [2003:f6:5f47:db04:e777:7730:859:e43d]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-48fe537c788sm243844645e9.12.2026.05.18.06.33.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 06:33:17 -0700 (PDT) From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=29?= To: netdev@vger.kernel.org Cc: Krzysztof Kozlowski , Simon Horman , Jakub Kicinski , Andy Shevchenko , Ian Ray , Carl Lee , Tomasz Unger , linux-kernel@vger.kernel.org Subject: [PATCH net-next] nfc: Use named initializers for struct i2c_device_id Date: Mon, 18 May 2026 15:33:11 +0200 Message-ID: <20260518133311.644160-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=5358; i=u.kleine-koenig@baylibre.com; h=from:subject; bh=q+NL498EPwlLrfBIQdB3BECdx05b64cjxCXzpG0xTJ0=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBqCxUXThEW6Nq13Oz81FfCrtatidoB3q7GafQ65 dmkO2+lBbKJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCagsVFwAKCRCPgPtYfRL+ TqsiB/0XWNdPHkDty7XNjYW9I9f5kgKbFADXrVc3AqBxY4nfHJkTfPVX5o+CQEJ+NfEmvfNWvHl A0/Zx5xQvJmJmSuUgviIT0/4p2QbOh2MMARHD2dflqWmjEbdaObReOp2AiXx1ZZno4TcWuq3/Bs cQKq59gTy5CwtGmz+DYEwStMmOW3FdXAH8dGU7dfyz88KRLZgSgdPj47P0dIvvuSGWfT1ZZ7i2d RJVDDGam3ovd4yNKjrLnaWLEZY6L+hzu9mccMFJLLb4d7fvtT7AYuGhsAFg4mrE30iLTMmmRQSt PfRJemSMacCnxWEVZ0Z7OwuHEgFPFyGvmG2+b5wU1VzKbqpD X-Developer-Key: i=u.kleine-koenig@baylibre.com; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition. While touching all these arrays, unify usage of whitespace in the list terminator. This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds. Signed-off-by: Uwe Kleine-K=C3=B6nig (The Capable Hub) Reviewed-by: Krzysztof Kozlowski --- Hello, this patch is part of a bigger quest to use named initializers for mainly struct i2c_device_id::driver_data to be able to modify i2c_device_id. See e.g. https://lore.kernel.org/all/20260518111203.639603-2-u.kleine-koenig@baylibr= e.com/ for the details. This patch here isn't critical for this quest, as no driver makes use of .driver_data, so apart from the better readability this is only about consistency with other subsystems. According to MAINTAINERS the nfc subsystem is orphaned, so I hope someone feels responsible to pick up this patch. Best regards Uwe drivers/nfc/microread/i2c.c | 2 +- drivers/nfc/nfcmrvl/i2c.c | 4 ++-- drivers/nfc/nxp-nci/i2c.c | 4 ++-- drivers/nfc/pn533/i2c.c | 4 ++-- drivers/nfc/pn544/i2c.c | 4 ++-- drivers/nfc/s3fwrn5/i2c.c | 4 ++-- drivers/nfc/st-nci/i2c.c | 4 ++-- drivers/nfc/st21nfca/i2c.c | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/nfc/microread/i2c.c b/drivers/nfc/microread/i2c.c index f00cff7f9693..f45e883b8730 100644 --- a/drivers/nfc/microread/i2c.c +++ b/drivers/nfc/microread/i2c.c @@ -276,7 +276,7 @@ static void microread_i2c_remove(struct i2c_client *cli= ent) } =20 static const struct i2c_device_id microread_i2c_id[] =3D { - { MICROREAD_I2C_DRIVER_NAME }, + { .name =3D MICROREAD_I2C_DRIVER_NAME }, { } }; MODULE_DEVICE_TABLE(i2c, microread_i2c_id); diff --git a/drivers/nfc/nfcmrvl/i2c.c b/drivers/nfc/nfcmrvl/i2c.c index 39ecf2aeda80..66877a7d03f2 100644 --- a/drivers/nfc/nfcmrvl/i2c.c +++ b/drivers/nfc/nfcmrvl/i2c.c @@ -252,8 +252,8 @@ static const struct of_device_id of_nfcmrvl_i2c_match[]= __maybe_unused =3D { MODULE_DEVICE_TABLE(of, of_nfcmrvl_i2c_match); =20 static const struct i2c_device_id nfcmrvl_i2c_id_table[] =3D { - { "nfcmrvl_i2c" }, - {} + { .name =3D "nfcmrvl_i2c" }, + { } }; MODULE_DEVICE_TABLE(i2c, nfcmrvl_i2c_id_table); =20 diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c index b3d34433bd14..19b019e3557f 100644 --- a/drivers/nfc/nxp-nci/i2c.c +++ b/drivers/nfc/nxp-nci/i2c.c @@ -322,8 +322,8 @@ static void nxp_nci_i2c_remove(struct i2c_client *clien= t) } =20 static const struct i2c_device_id nxp_nci_i2c_id_table[] =3D { - { "nxp-nci_i2c" }, - {} + { .name =3D "nxp-nci_i2c" }, + { } }; MODULE_DEVICE_TABLE(i2c, nxp_nci_i2c_id_table); =20 diff --git a/drivers/nfc/pn533/i2c.c b/drivers/nfc/pn533/i2c.c index 132c050a365d..94aca9119f0f 100644 --- a/drivers/nfc/pn533/i2c.c +++ b/drivers/nfc/pn533/i2c.c @@ -249,8 +249,8 @@ static const struct of_device_id of_pn533_i2c_match[] _= _maybe_unused =3D { MODULE_DEVICE_TABLE(of, of_pn533_i2c_match); =20 static const struct i2c_device_id pn533_i2c_id_table[] =3D { - { PN533_I2C_DRIVER_NAME }, - {} + { .name =3D PN533_I2C_DRIVER_NAME }, + { } }; MODULE_DEVICE_TABLE(i2c, pn533_i2c_id_table); =20 diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c index b31b5bef7187..dcfa96bd4345 100644 --- a/drivers/nfc/pn544/i2c.c +++ b/drivers/nfc/pn544/i2c.c @@ -44,8 +44,8 @@ PN544_HCI_I2C_LLC_MAX_PAYLOAD) =20 static const struct i2c_device_id pn544_hci_i2c_id_table[] =3D { - { "pn544" }, - {} + { .name =3D "pn544" }, + { } }; =20 MODULE_DEVICE_TABLE(i2c, pn544_hci_i2c_id_table); diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c index 91b8d1445efd..e9a34d27a369 100644 --- a/drivers/nfc/s3fwrn5/i2c.c +++ b/drivers/nfc/s3fwrn5/i2c.c @@ -205,8 +205,8 @@ static void s3fwrn5_i2c_remove(struct i2c_client *clien= t) } =20 static const struct i2c_device_id s3fwrn5_i2c_id_table[] =3D { - { S3FWRN5_I2C_DRIVER_NAME }, - {} + { .name =3D S3FWRN5_I2C_DRIVER_NAME }, + { } }; MODULE_DEVICE_TABLE(i2c, s3fwrn5_i2c_id_table); =20 diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc/st-nci/i2c.c index 416770adbeba..9ae839a6f5cc 100644 --- a/drivers/nfc/st-nci/i2c.c +++ b/drivers/nfc/st-nci/i2c.c @@ -257,8 +257,8 @@ static void st_nci_i2c_remove(struct i2c_client *client) } =20 static const struct i2c_device_id st_nci_i2c_id_table[] =3D { - { ST_NCI_DRIVER_NAME }, - {} + { .name =3D ST_NCI_DRIVER_NAME }, + { } }; MODULE_DEVICE_TABLE(i2c, st_nci_i2c_id_table); =20 diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c index 6d7861383806..aa5f4922b6b0 100644 --- a/drivers/nfc/st21nfca/i2c.c +++ b/drivers/nfc/st21nfca/i2c.c @@ -572,8 +572,8 @@ static void st21nfca_hci_i2c_remove(struct i2c_client *= client) } =20 static const struct i2c_device_id st21nfca_hci_i2c_id_table[] =3D { - { ST21NFCA_HCI_DRIVER_NAME }, - {} + { .name =3D ST21NFCA_HCI_DRIVER_NAME }, + { } }; MODULE_DEVICE_TABLE(i2c, st21nfca_hci_i2c_id_table); =20 base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731 --=20 2.47.3