diff options
| author | Arnd Bergmann <[email protected]> | 2025-06-10 09:25:22 +0000 |
|---|---|---|
| committer | Miquel Raynal <[email protected]> | 2025-06-18 09:16:35 +0000 |
| commit | d22d5f47ecb2c4e140c0ee52204f4dd8fd0e85eb (patch) | |
| tree | 92c727901be192af349e0b9a7327f9b9cc1cddd4 /tools/perf/scripts/python/flamegraph.py | |
| parent | dt-bindings: mtd: convert nxp-spifi.txt to yaml format (diff) | |
| download | kernel-d22d5f47ecb2c4e140c0ee52204f4dd8fd0e85eb.tar.gz kernel-d22d5f47ecb2c4e140c0ee52204f4dd8fd0e85eb.zip | |
mtd: nftl: reduce stack usage in NFTL_movebuf()
The code in the ntfl write function is rather complex, and it contains
a 512 byte on-stack buffer. The combination of these two leads to using
more than the per-function stack warning limit in some configurations,
especially with KASAN enabled:
drivers/mtd/nftlcore.c:673:12: error: stack frame size (1328) exceeds limit (1280) in 'nftl_writeblock' [-Werror,-Wframe-larger-than]
Avoid this warning by moving the on-stack buffer into a separate function
that only copies one part of the device to another.
This does not really help with the total maximum stack usage in the
(non-KASAN) normal case, but it does two things:
- no single function has more than the warning limit
- the complexity goes down, so the parent function ends up
spilling few local variables, and the total actually goes
down slightly.
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
