On Wed, Jan 03, 2018 at 10:40:52AM +0100, Linus Walleij wrote: > So someone wanted to save a slab by using this instead of allocating > the array dynamically. It's not a very admirable coding style to begin > with. I doubt the system gains much from this. Right, David was very focused on saving memory. > If you agree I can rewrite it to have struct gpio_desc ** and > dynamically allocate that to the number of descriptors with devm_kzalloc() > instead, that is more in line with kernel patterns and this memory > optimization anyways seems a bit overdone anyways. Yes, that would be clearer - it's something that's good to fix anyway rather than trying to contort around it.
Attachment:
signature.asc
Description: PGP signature