Re: [PATCH v2 03/15] auxdisplay: linedisp: Use unique number for id

From: Andy Shevchenko
Date: Thu Feb 15 2024 - 06:28:25 EST


On Thu, Feb 15, 2024 at 11:03:27AM +0100, Geert Uytterhoeven wrote:
> On Mon, Feb 12, 2024 at 6:04 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

..

> > struct linedisp {
> > struct device dev;
> > + unsigned int id;
>
> Note that there is a hole on 64-bit platforms.
> Hence I'd move id below, so the hole is at the end of the
> structure, and might be filled by future changes.

I had checked timer_list, but while it has holes, without debug it ends on
4-bytes boundary (without debug enabled), otherwise on 8-bytes.
Nevertheless, relying on the above seems fragile, so I follow your suggestion.
Thank you!

> > struct timer_list timer;
> > void (*update)(struct linedisp *linedisp);
> > char *buf;

--
With Best Regards,
Andy Shevchenko