Re: [PATCH 01/16] gpio: dwapb: Use modern PM macros

From: Andy Shevchenko
Date: Wed Aug 20 2025 - 15:05:31 EST


On Wed, Aug 20, 2025 at 8:11 PM Michael Büsch <mb@xxxxxxx> wrote:
>
> On Wed, 20 Aug 2025 19:54:44 +0300
> Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:
>
> > > The dwapb_context structure is always embedded into struct
> > > dwapb_gpio_port to simplify code. Sure this brings a tiny 36 bytes
> > > data overhead for !CONFIG_PM_SLEP.
> >
> > I don't think it's a good approach to add a lot of data for peanuts in
> > case of PM_SLEEP=n.
>
> It wastes 36 bytes in case of PM=n.

...per port.

> The driver currently allocates the struct with kzalloc and stores a pointer to it
> in case of PM=y.
> So this probably has an overhead in the same order of magnitude (pointer +
> malloc overhead/alignment/fragmentation) in case of PM=y now.

...per driver.

So, I can't say it's equal, but I leave this to maintainers to decide,


--
With Best Regards,
Andy Shevchenko