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

Michael Büsch mb at bues.ch
Wed Aug 20 10:10:39 PDT 2025


On Wed, 20 Aug 2025 19:54:44 +0300
Andy Shevchenko <andy.shevchenko at gmail.com> 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.

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.

-- 
Michael Büsch
https://bues.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250820/6ed98b13/attachment.sig>


More information about the linux-arm-kernel mailing list