Commit 781813d
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: 735668f ("i2c: core: Allocate temp client on the stack in i2c_detect")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Su Hui <suhui@nfschina.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
[wsa: updated commit message, merged tags from similar patch]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>1 parent 0ad2507 commit 781813d
1 file changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2506 | 2506 | | |
2507 | 2507 | | |
2508 | 2508 | | |
2509 | | - | |
| 2509 | + | |
2510 | 2510 | | |
2511 | 2511 | | |
2512 | 2512 | | |
| |||
2527 | 2527 | | |
2528 | 2528 | | |
2529 | 2529 | | |
2530 | | - | |
2531 | | - | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
2532 | 2535 | | |
2533 | 2536 | | |
2534 | 2537 | | |
2535 | 2538 | | |
2536 | 2539 | | |
2537 | | - | |
2538 | | - | |
| 2540 | + | |
| 2541 | + | |
2539 | 2542 | | |
2540 | 2543 | | |
2541 | 2544 | | |
2542 | 2545 | | |
| 2546 | + | |
| 2547 | + | |
2543 | 2548 | | |
2544 | 2549 | | |
2545 | 2550 | | |
| |||
0 commit comments