diff options
author | Arnd Bergmann <arnd@arndb.de> | 2025-06-10 11:23:06 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2025-06-16 06:30:57 -0700 |
commit | 744c2fe950e936c4d62430de899d6253424200ed (patch) | |
tree | f4f98aafe9f5b74e471ac4af37ac89f8436e68a6 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | 14c9ede9ca4cd078ad76a6ab9617b81074eb58bf (diff) |
hwmon: (occ) Rework attribute registration for stack usage
clang produces an output with excessive stack usage when building the
occ_setup_sensor_attrs() function, apparently the result of having
a lot of struct literals and building with the -fno-strict-overflow
option that leads clang to skip some optimization in case the 'attr'
pointer overruns:
drivers/hwmon/occ/common.c:775:12: error: stack frame size (1392) exceeds limit (1280) in 'occ_setup_sensor_attrs' [-Werror,-Wframe-larger-than]
Replace the custom macros for initializing the attributes with a
simpler function call that does not run into this corner case.
Link: https://godbolt.org/z/Wf1Yx76a5
Fixes: 54076cb3b5ff ("hwmon (occ): Add sensor attributes and register hwmon device")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250610092315.2640039-1-arnd@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions