Re: [PATCH] Revert "i2c: core: Allocate temp client on the stack in i2c_detect"

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

 



On 2/21/25 12:54, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@xxxxxxxx>

struct i2c_client is way too large to be put on the kernel stack, and depending
on the kernel configuration, this can exceed the compile-time warning limit:

drivers/i2c/i2c-core-base.c:1420:12: error: stack frame size (1040) exceeds limit (1024) in 'i2c_do_add_adapter' [-Werror,-Wframe-larger-than]
  1420 | static int i2c_do_add_adapter(struct i2c_driver *driver,
       |            ^

The current version is the result of a cleanup patch that does not appear
to be a requirement for anything else, so address the problem through a
simple revert.

Fixes: 735668f8e5c9 ("i2c: core: Allocate temp client on the stack in i2c_detect")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux