mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] drm: Use named initializers for arrays of i2c_device_data
@ 2026-11-11  8:49 Uwe Kleine-König (The Capable Hub)
  2026-11-11  8:49 ` [PATCH v3 1/2] drm/sitronix/st7571-i2c: Drop unused assignment of i2c_device_id driver data Uwe Kleine-König (The Capable Hub)
  2026-11-11  8:49 ` [PATCH v3 2/2] drm/nouveau: Use named initializers for i2c_device_id arrays Uwe Kleine-König (The Capable Hub)
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-11-11  8:49 UTC (permalink / raw)
  To: Marcus Folkesson, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Lyude Paul, Danilo Krummrich
  Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel,
	Luca Ceresoli, nouveau

Hello,

v2 is available at
https://lore.kernel.org/cover.1784545092.git.u.kleine-koenig@baylibre.com.
The first patch of the v2 series was applied, so this is a resend of the
two remaining patches with the collected tags added and (trivially)
rebased to v7.4-rc1.

Best regards
Uwe

Uwe Kleine-König (The Capable Hub) (2):
  drm/sitronix/st7571-i2c: Drop unused assignment of i2c_device_id
    driver data
  drm/nouveau: Use named initializers for i2c_device_id arrays

 drivers/gpu/drm/nouveau/dispnv04/i2c/ch7006_drv.c | 2 +-
 drivers/gpu/drm/nouveau/dispnv04/i2c/sil164_drv.c | 2 +-
 drivers/gpu/drm/sitronix/st7571-i2c.c             | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)


base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
-- 
2.56.0.rc1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v3 1/2] drm/sitronix/st7571-i2c: Drop unused assignment of i2c_device_id driver data
  2026-11-11  8:49 [PATCH v3 0/2] drm: Use named initializers for arrays of i2c_device_data Uwe Kleine-König (The Capable Hub)
@ 2026-11-11  8:49 ` Uwe Kleine-König (The Capable Hub)
  2026-11-11  8:49 ` [PATCH v3 2/2] drm/nouveau: Use named initializers for i2c_device_id arrays Uwe Kleine-König (The Capable Hub)
  1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-11-11  8:49 UTC (permalink / raw)
  To: Marcus Folkesson, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
  Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel, Luca Ceresoli

The driver explicitly set the .driver_data member of struct
i2c_device_id to zero without relying on that value. Drop this unused
assignment.

While touching this array use a named initializer for .name.

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/gpu/drm/sitronix/st7571-i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sitronix/st7571-i2c.c b/drivers/gpu/drm/sitronix/st7571-i2c.c
index 44bc94be33d6..be6fbed8adaa 100644
--- a/drivers/gpu/drm/sitronix/st7571-i2c.c
+++ b/drivers/gpu/drm/sitronix/st7571-i2c.c
@@ -134,8 +134,8 @@ static const struct of_device_id st7571_of_match[] = {
 MODULE_DEVICE_TABLE(of, st7571_of_match);
 
 static const struct i2c_device_id st7571_id[] = {
-	{ "st7567", 0 },
-	{ "st7571", 0 },
+	{ .name = "st7567" },
+	{ .name = "st7571" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, st7571_id);
-- 
2.56.0.rc1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v3 2/2] drm/nouveau: Use named initializers for i2c_device_id arrays
  2026-11-11  8:49 [PATCH v3 0/2] drm: Use named initializers for arrays of i2c_device_data Uwe Kleine-König (The Capable Hub)
  2026-11-11  8:49 ` [PATCH v3 1/2] drm/sitronix/st7571-i2c: Drop unused assignment of i2c_device_id driver data Uwe Kleine-König (The Capable Hub)
@ 2026-11-11  8:49 ` Uwe Kleine-König (The Capable Hub)
  1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-11-11  8:49 UTC (permalink / raw)
  To: Lyude Paul, Danilo Krummrich
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Luca Ceresoli, dri-devel, nouveau,
	linux-kernel

Named initializers are better readable and more robust to changes of the
struct definition. This robustness is relevant for a planned change to
struct platform_device_id replacing .driver_data by an anonymous union.
(Though these drivers don't use .driver_data, so this patch isn't
strictly needed, but still good for consistency.)

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/gpu/drm/nouveau/dispnv04/i2c/ch7006_drv.c | 2 +-
 drivers/gpu/drm/nouveau/dispnv04/i2c/sil164_drv.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/i2c/ch7006_drv.c b/drivers/gpu/drm/nouveau/dispnv04/i2c/ch7006_drv.c
index 976ed59a86e4..96dabdb38c4b 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/i2c/ch7006_drv.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/i2c/ch7006_drv.c
@@ -486,7 +486,7 @@ static int ch7006_encoder_init(struct i2c_client *client,
 }
 
 static const struct i2c_device_id ch7006_ids[] = {
-	{ "ch7006" },
+	{ .name = "ch7006" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ch7006_ids);
diff --git a/drivers/gpu/drm/nouveau/dispnv04/i2c/sil164_drv.c b/drivers/gpu/drm/nouveau/dispnv04/i2c/sil164_drv.c
index 7f402b901977..2324507eb5f3 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/i2c/sil164_drv.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/i2c/sil164_drv.c
@@ -414,7 +414,7 @@ sil164_encoder_init(struct i2c_client *client,
 }
 
 static const struct i2c_device_id sil164_ids[] = {
-	{ "sil164" },
+	{ .name = "sil164" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, sil164_ids);
-- 
2.56.0.rc1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-11  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11  8:49 [PATCH v3 0/2] drm: Use named initializers for arrays of i2c_device_data Uwe Kleine-König (The Capable Hub)
2026-11-11  8:49 ` [PATCH v3 1/2] drm/sitronix/st7571-i2c: Drop unused assignment of i2c_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-11-11  8:49 ` [PATCH v3 2/2] drm/nouveau: Use named initializers for i2c_device_id arrays Uwe Kleine-König (The Capable Hub)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®