From nobody Mon Jun 8 08:35:25 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B28247F2EE for ; Thu, 4 Jun 2026 16:50:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780591848; cv=none; b=FpHAMw1lB+VF2VoaYBf5OiJILOJC2Sf6fy0vftK1UHkotyTt1z+M3Gf0HfELTG4Z05/d79JMcjrtMjvZ0C0eO7f+a4mWRUfykvvLiciRsMCm+dHMzDL7rVQlGLEjk+xVa5ePK6K9hVYkcmB+Jb8gObT5g4tXyfJ0vYLXyXf4qNs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780591848; c=relaxed/simple; bh=WXXcmzbGYgXayA7PyCZ6VcBAw1mM/4fzGpOBAPl5/m0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gMPBIBJa36lo34XuczJS2TiVvxuzr4ivWVKr7HdEz6Isb4MStMubFOkzdvz6/ljkQcfVgvF2F0ti86O22iQldosoxSLMusRQ8C6DjAd5Yld5WyOPCAxtCQGLQS+clpWf6bow4JMi2FVKHombhRVzfuDsyK0kLp/7ZY0L0t3fwac= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gMFEakPB; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gMFEakPB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 675A01F00893; Thu, 4 Jun 2026 16:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780591846; bh=gCj12aMOs/U+0EExv3sQjQ8jGBmEVyrbaOt9quywSss=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gMFEakPBre/cxWwtg8H8d6Edh6cjlatcOADQq9KYM5ZzAetm6VIKyHPDoYREM0Fx8 GeyCspvk4eZA3bDX8wPuW0BrAh5NiB9fQm+hoRtGEdkX1gxsMD6CgC1rzbAk3hBtoR rT2L2fE1Otm0mpHFqaP39jPE6y55GI9LZ4D2WhhUpytvh4t2g4jRfUD9GBVKy9vZqs QmJfTZ88SiGr++V8TrOC4KvatcDsf9WGY9h23uK08dUMJhksqgt5RJgqAfI/Xjbz3i J+hF6I2HC++BNGpDTckfftboN3P1Cw0sC6W6wavhoTbbOqKsGYfWomSwfni1fUa6i/ YuWGH5ITddMCw== From: Krzysztof Kozlowski To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=29?= , Krzysztof Kozlowski Subject: [PATCH 1/1] w1: ds2482: Use named initializers for arrays of i2c_device_data Date: Thu, 4 Jun 2026 18:50:28 +0200 Message-ID: <20260604165027.83922-4-krzk@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260604165027.83922-3-krzk@kernel.org> References: <20260604165027.83922-3-krzk@kernel.org> 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=1374; i=krzk@kernel.org; h=from:subject; bh=EpOYYuXjvh4fD4cAeP6TsDwzeP/v8KUyDaJHFTbEcLA=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqIazUenWrNy8apu2ADQZeCCpKGMKaIR1Fv8Lx1 uzGUWbtEkuJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaiGs1AAKCRDBN2bmhouD 10+QD/9SlOfddR94BZ8Rus695IWxK15PFo2J5kQmlUMLo61S1YIzfX5C5PPMzCIKKpSfgNdoBgH uru017BxKIkzP9ygbr1HllLiDwYwqbgPzA4XOiZbyZfRglU39EDfDD72PfIpspHK6eBLqU6y/w+ L30+0IWnQ46mwn7mGNgWa6MvV7V2eje3CCDdVDxXgZWYQJvYsSu+bW/AScjTCkFc2xHGwnC/DA+ BCQsnJQumOSId38ZZNvgKtdk8Yu7POC90xMx9GqTfNKzcxcBzpEXAneiNreXFRa+aSJkxRuW6OA N6QoGvzcDP9l2i8yDOOKZdnn/ZZYX6arlGOK6izaT/Hq65V8CzAXlkmO4yxHQJkbiJ067btjUlr j91E1VWkoF+4nL+vZbLM7bOMQFTHJmVCQ7qQezbhbBxM3cxHBtUiqG9rmuloIxuX4PPndVjXeS9 aVEFH12azyl33twH4mNzrwaKfw3SXH5TxveAoo5t8XeHtD7OTABV2dntlbrexkGF4TytvlLvted /Bf9j/yT0tqchIJ+hhNy9frYPQ+Mi6TFj8bEkeO/T4M1s8GVbfiNwsTgHqZaP33xdmHpr3Eb1gq ei/EYVjNBmujznc5Y3A8oeyE8PrBn10jLU92VNwg7AUCeXaoIK7y8OpiB5nO4GPL4LdbMv3OXD6 ElQI6CTrGZZhxRQ== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Content-Transfer-Encoding: quoted-printable From: Uwe Kleine-K=C3=B6nig (The Capable Hub) 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. The mentioned robustness is relevant for a planned change to struct i2c_device_id that replaces .driver_data by an anonymous union. 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) Link: https://patch.msgid.link/20260518171456.872736-2-u.kleine-koenig@bayl= ibre.com Signed-off-by: Krzysztof Kozlowski --- drivers/w1/masters/ds2482.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c index e2a568c9a43a..0069e6f854d7 100644 --- a/drivers/w1/masters/ds2482.c +++ b/drivers/w1/masters/ds2482.c @@ -539,8 +539,8 @@ static void ds2482_remove(struct i2c_client *client) * Driver data (common to all clients) */ static const struct i2c_device_id ds2482_id[] =3D { - { "ds2482" }, - { "ds2484" }, + { .name =3D "ds2482" }, + { .name =3D "ds2484" }, { } }; MODULE_DEVICE_TABLE(i2c, ds2482_id); --=20 2.53.0