Re: [PATCHv4] gpio: Remove VLA from gpiolib

2018-04-14 Thread Phil Reid
On 14/04/2018 05:10, Laura Abbott wrote: On 04/12/2018 05:39 PM, Phil Reid wrote: On 12/04/2018 16:38, Linus Walleij wrote: On Wed, Apr 11, 2018 at 3:03 AM, Laura Abbott wrote: The new challenge is to remove VLAs from the kernel (see https://lkml.org/lkml/2018/3/7/621)

Re: [PATCHv4] gpio: Remove VLA from gpiolib

2018-04-14 Thread Phil Reid
On 14/04/2018 05:10, Laura Abbott wrote: On 04/12/2018 05:39 PM, Phil Reid wrote: On 12/04/2018 16:38, Linus Walleij wrote: On Wed, Apr 11, 2018 at 3:03 AM, 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

Re: [PATCHv4] gpio: Remove VLA from gpiolib

2018-04-13 Thread Laura Abbott
On 04/12/2018 05:39 PM, Phil Reid wrote: On 12/04/2018 16:38, Linus Walleij wrote: On Wed, Apr 11, 2018 at 3:03 AM, 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

Re: [PATCHv4] gpio: Remove VLA from gpiolib

2018-04-13 Thread Laura Abbott
On 04/12/2018 05:39 PM, Phil Reid wrote: On 12/04/2018 16:38, Linus Walleij wrote: On Wed, Apr 11, 2018 at 3:03 AM, 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

Re: [PATCHv4] gpio: Remove VLA from gpiolib

2018-04-12 Thread Phil Reid
On 12/04/2018 16:38, Linus Walleij wrote: On Wed, Apr 11, 2018 at 3:03 AM, 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

Re: [PATCHv4] gpio: Remove VLA from gpiolib

2018-04-12 Thread Phil Reid
On 12/04/2018 16:38, Linus Walleij wrote: On Wed, Apr 11, 2018 at 3:03 AM, 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

Re: [PATCHv4] gpio: Remove VLA from gpiolib

2018-04-12 Thread Linus Walleij
On Wed, Apr 11, 2018 at 3:03 AM, 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

Re: [PATCHv4] gpio: Remove VLA from gpiolib

2018-04-12 Thread Linus Walleij
On Wed, Apr 11, 2018 at 3:03 AM, 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.

Re: [PATCHv4] gpio: Remove VLA from gpiolib

2018-04-11 Thread Lukas Wunner
On Tue, Apr 10, 2018 at 06:03:52PM -0700, Laura Abbott wrote: > --- a/drivers/gpio/gpiolib.c > +++ b/drivers/gpio/gpiolib.c > @@ -61,6 +61,11 @@ static struct bus_type gpio_bus_type = { > .name = "gpio", > }; > > +/* > + * Number of GPIOs to use for the fast path in set array > + */ >

Re: [PATCHv4] gpio: Remove VLA from gpiolib

2018-04-11 Thread Lukas Wunner
On Tue, Apr 10, 2018 at 06:03:52PM -0700, Laura Abbott wrote: > --- a/drivers/gpio/gpiolib.c > +++ b/drivers/gpio/gpiolib.c > @@ -61,6 +61,11 @@ static struct bus_type gpio_bus_type = { > .name = "gpio", > }; > > +/* > + * Number of GPIOs to use for the fast path in set array > + */ >

[PATCHv4] gpio: Remove VLA from gpiolib

2018-04-10 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

[PATCHv4] gpio: Remove VLA from gpiolib

2018-04-10 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