Skip to content
Commit 781813db authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Wolfram Sang
Browse files

i2c: core: Allocate temporary client dynamically



drivers/i2c/i2c-core-base.c: In function ‘i2c_detect.isra’:
drivers/i2c/i2c-core-base.c:2544:1: warning: the frame size of 1312 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 2544 | }
      | ^

Fix this by allocating the temporary client structure dynamically, as it
is a rather large structure (1216 bytes, depending on kernel config).
This is basically a revert of the to-be-fixed commit with some
checkpatch improvements.

Fixes: 735668f8 ("i2c: core: Allocate temp client on the stack in i2c_detect")
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarSu Hui <suhui@nfschina.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
[wsa: updated commit message, merged tags from similar patch]
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
parent 0ad2507d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment