Re: [PATCH] gpio: acpi: work around false-positive -Wstring-overflow warning

2017-09-12 Thread Linus Walleij
On Wed, Sep 6, 2017 at 5:47 PM, Arnd Bergmann wrote: > gcc-7 notices that the pin_table is an array of 16-bit numbers, > but fails to take the following range check into account: > > drivers/gpio/gpiolib-acpi.c: In function 'acpi_gpiochip_request_interrupt': > drivers/gpio/gpiolib-acpi.c:206:24:

Re: [PATCH] gpio: acpi: work around false-positive -Wstring-overflow warning

2017-09-06 Thread Mika Westerberg
On Wed, Sep 06, 2017 at 05:47:45PM +0200, Arnd Bergmann wrote: > gcc-7 notices that the pin_table is an array of 16-bit numbers, > but fails to take the following range check into account: > > drivers/gpio/gpiolib-acpi.c: In function 'acpi_gpiochip_request_interrupt': > drivers/gpio/gpiolib-acpi.c

Re: [PATCH] gpio: acpi: work around false-positive -Wstring-overflow warning

2017-09-06 Thread Joe Perches
On Wed, 2017-09-06 at 21:53 +0200, Arnd Bergmann wrote: > On Wed, Sep 6, 2017 at 5:52 PM, Joe Perches wrote: > > On Wed, 2017-09-06 at 17:47 +0200, Arnd Bergmann wrote: > > > As suggested by Andy, this changes the format string to have a fixed > > > length. > > > Since modifying the range check d

Re: [PATCH] gpio: acpi: work around false-positive -Wstring-overflow warning

2017-09-06 Thread Arnd Bergmann
On Wed, Sep 6, 2017 at 5:52 PM, Joe Perches wrote: > On Wed, 2017-09-06 at 17:47 +0200, Arnd Bergmann wrote: >> As suggested by Andy, this changes the format string to have a fixed length. >> Since modifying the range check did not help, I also opened a bug against >> gcc, see link below. > > The

Re: [PATCH] gpio: acpi: work around false-positive -Wstring-overflow warning

2017-09-06 Thread Joe Perches
On Wed, 2017-09-06 at 17:47 +0200, Arnd Bergmann wrote: > gcc-7 notices that the pin_table is an array of 16-bit numbers, > but fails to take the following range check into account: > > drivers/gpio/gpiolib-acpi.c: In function 'acpi_gpiochip_request_interrupt': > drivers/gpio/gpiolib-acpi.c:206:24