]> git.baikalelectronics.ru Git - kernel.git/commit
drm/selftests: reduce stack usage
authorArnd Bergmann <arnd@arndb.de>
Fri, 28 Jun 2019 12:16:45 +0000 (14:16 +0200)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Mon, 1 Jul 2019 07:50:58 +0000 (09:50 +0200)
commit38bb5a306b4dcd85afd55a99cb3ed573e94371ed
tree873610fa15976582d6a927c283d889a212401f1e
parentb4b2af53feaa4b10411a5edb1d3081ffe53ebe5d
drm/selftests: reduce stack usage

Putting a large drm_connector object on the stack can lead to warnings
in some configuration, such as:

drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:18:12: error: stack frame size of 1040 bytes in function 'drm_cmdline_test_res' [-Werror,-Wframe-larger-than=]
static int drm_cmdline_test_res(void *ignored)

Since the object is never modified, just declare it as 'static const'
and allow this to be passed down.

Fixes: 791c82b15539 ("drm/selftests: Add command line parser selftests")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190628121712.1928142-1-arnd@arndb.de
drivers/gpu/drm/drm_modes.c
drivers/gpu/drm/selftests/test-drm_cmdline_parser.c
include/drm/drm_modes.h