Re: [PATCH v4 4/6] drm/ssd130x: Replace positional ssd130x_spi_id[] initialization with C99
Andy Shevchenko <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.comp.video.dri.devel,gmane.linux.drivers.devicetree |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
On Tue, Aug 18, 2026 at 11:06:24AM +0300, Amit Barzilai wrote: > ssd130x_spi_id[] is initialized with positional initializers, which > easily create easy-to-miss bugs when changing the members of the target > struct (struct spi_device_id in this example). > > Change this to C99 initializers to guarantee each member is initialized > with the correct value. Reviewed-by: Andy Shevchenko <[email protected]> ... > static const struct spi_device_id ssd130x_spi_id[] = { > /* ssd130x family */ > + { .name = "sh1106", .driver_data = SH1106_ID }, Hmm... Is the comment correct for sh1106? > /* ssd132x family */ > /* ssd133x family */ Overall, what do these comment bring us? Are those families have something in common? Because the driver data is unique for each device, so I assume it's not that compatible inside even the same families. TL;DR: Perhaps simply drop those comments for once? -- With Best Regards, Andy Shevchenko