Re: [PATCH v2 13/23] mfd: Use named initializers for arrays of i2c_device_id
André Draszik <[email protected]> Wed, 08 Jul 2026 13:55:06 +0100
| Newsgroups | org.kernel.vger.linux-omap,dev.linux.lists.imx,dev.linux.lists.mfd,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-sound |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2026-07-08 at 13:15 +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. > > This patch doesn't modify the compiled arrays, only their representation > in source form benefits. > > Signed-off-by: Uwe Kleine-König (The Capable Hub) <[email protected]> > --- > drivers/mfd/max77759.c | 2 +- Reviewed-by: André Draszik <[email protected]> # for Maxim MAX77759