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>