diff options
author | Nathan Chancellor <nathan@kernel.org> | 2022-03-02 16:59:09 -0700 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-03-21 11:05:05 +0100 |
commit | a860f266a0e19f271b839451d291a6acf6ddcfe8 (patch) | |
tree | 84feabfc8ffb63cb2350c0d8b5eea352deee30c3 /include/linux/dma-fence-array.h | |
parent | 1d204ee10817aed6666e020ef1b4c643d68bef11 (diff) | |
download | linux-a860f266a0e19f271b839451d291a6acf6ddcfe8.tar.gz linux-a860f266a0e19f271b839451d291a6acf6ddcfe8.tar.bz2 linux-a860f266a0e19f271b839451d291a6acf6ddcfe8.zip |
drm/selftest: plane_helper: Put test structures in static storage
Clang warns on certain 32-bit architectures:
drivers/gpu/drm/selftests/test-drm_plane_helper.c:76:5: warning: stack frame size (1064) exceeds limit (1024) in 'igt_check_plane_state' [-Wframe-larger-than]
int igt_check_plane_state(void *ignored)
^
1 warning generated.
The structures in igt_check_plane_state() total 1008 bytes, so any small
amount of inlining will cause the stack frame to exceed the 32-bit limit
of 1024, triggering the warning.
Move these structures to static storage, which dramatically reduces the
amount of stack space in igt_check_plane_state(). There is no testing
impact, as igt_check_plane_state() is only called once in the driver.
Fixes: 943e6a8beeac ("mock a drm_plane in igt_check_plane_state to make the test more robust")
Link: https://github.com/ClangBuiltLinux/linux/issues/1600
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220302235909.784935-1-nathan@kernel.org
Diffstat (limited to 'include/linux/dma-fence-array.h')
0 files changed, 0 insertions, 0 deletions