Re: [PATCHv9] gpio: Remove VLA from gpiolib

2018-05-23 Thread Linus Walleij
On Mon, May 21, 2018 at 7:57 PM, Laura Abbott wrote: > The new challenge is to remove VLAs from the kernel > (see https://lkml.org/lkml/2018/3/7/621) to eventually > turn on -Wvla. > > Using a kmalloc array is the easy way to fix this but kmalloc is still > more expensive than stack allocation. I

Re: [PATCHv9] gpio: Remove VLA from gpiolib

2018-05-21 Thread Andy Shevchenko
On Mon, May 21, 2018 at 8:57 PM, Laura Abbott wrote: > The new challenge is to remove VLAs from the kernel > (see https://lkml.org/lkml/2018/3/7/621) to eventually > turn on -Wvla. > > Using a kmalloc array is the easy way to fix this but kmalloc is still > more expensive than stack allocation. In

[PATCHv9] gpio: Remove VLA from gpiolib

2018-05-21 Thread Laura Abbott
The new challenge is to remove VLAs from the kernel (see https://lkml.org/lkml/2018/3/7/621) to eventually turn on -Wvla. Using a kmalloc array is the easy way to fix this but kmalloc is still more expensive than stack allocation. Introduce a fast path with a fixed size stack array to cover most c