Re: [PATCH 4/5] spi: spi-gpio: Make optional chipselect handling more explicit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux