Thread (2 messages) 2 messages, 2 authors, 4d ago

Re: [PATCH] backlight: Use named initializers for arrays of i2c_device_data

From: Daniel Thompson <danielt@kernel.org>
Date: 2026-05-29 10:01:34
Also in: dri-devel, lkml

On Mon, May 18, 2026 at 01:12:03PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
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.

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önig (The Capable Hub) <redacted>
Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org>


Daniel.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help