* [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)
2026-11-18 15:15 ` [PATCH v3 0/2] drm: Use named initializers for arrays of i2c_device_data Uwe Kleine-König (The Capable Hub)
2 siblings, 0 replies; 4+ 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] 4+ 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)
2026-11-18 15:15 ` [PATCH v3 0/2] drm: Use named initializers for arrays of i2c_device_data Uwe Kleine-König (The Capable Hub)
2 siblings, 0 replies; 4+ 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] 4+ messages in thread* Re: [PATCH v3 0/2] drm: Use named initializers for arrays of i2c_device_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 ` [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)
@ 2026-11-18 15:15 ` Uwe Kleine-König (The Capable Hub)
2 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-11-18 15:15 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
[-- Attachment #1: Type: text/plain, Size: 583 bytes --]
Hello,
On Wed, Nov 11, 2026 at 09:49:43AM +0100, Uwe Kleine-König (The Capable Hub) wrote:
> 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.
This series is superseded by
https://lore.kernel.org/dri-devel/cover.1795002467.git.ukleinek@kernel.org/
It contains the first patch as #2 and the second as #5. (I only noticed
now, sorry.)
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread