Thread (3 messages) 3 messages, 3 authors, 2021-01-03

Re: [PATCH] gpiolib: cdev: fix frame size warning in gpio_ioctl()

From: Bartosz Golaszewski <hidden>
Date: 2021-01-03 15:35:34
Also in: lkml

On Sun, Dec 27, 2020 at 10:37 PM Linus Walleij [off-list ref] wrote:
On Sun, Dec 27, 2020 at 5:11 PM Kent Gibson [off-list ref] wrote:
quoted
The kernel test robot reports the following warning in [1]:

 drivers/gpio/gpiolib-cdev.c: In function 'gpio_ioctl':
 >>drivers/gpio/gpiolib-cdev.c:1437:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Refactor gpio_ioctl() to handle each ioctl in its own helper function
and so reduce the variables stored on the stack to those explicitly
required to service the ioctl at hand.

The lineinfo_get_v1() helper handles both the GPIO_GET_LINEINFO_IOCTL
and GPIO_GET_LINEINFO_WATCH_IOCTL, as per the corresponding v2
implementation - lineinfo_get().

[1] https://lore.kernel.org/lkml/202012270910.VW3qc1ER-lkp@intel.com/ (local)

Fixes: aad955842d1c ("gpiolib: cdev: support GPIO_V2_GET_LINEINFO_IOCTL and GPIO_V2_GET_LINEINFO_WATCH_IOCTL")
Reported-by: kernel test robot <redacted>
Signed-off-by: Kent Gibson <warthog618@gmail.com>
That's an interesting regression.
Anyway the kernel look better after than before the patch, so
Reviewed-by: Linus Walleij <redacted>

Bartosz will pick patches for Torvalds this kernel cycle.

Yours,
Linus Walleij
Applied with Linus' tag, thanks!

Bart
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help