From c0898fca3fce00f824e7f5d48e1edd0900378a03 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 28 Jun 2019 14:16:45 +0200 Subject: 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: b7ced38916a9 ("drm/selftests: Add command line parser selftests") Signed-off-by: Arnd Bergmann Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190628121712.1928142-1-arnd@arndb.de --- include/drm/drm_modes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/drm') diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h index 083f16747369..e946e20c61d8 100644 --- a/include/drm/drm_modes.h +++ b/include/drm/drm_modes.h @@ -537,7 +537,7 @@ void drm_connector_list_update(struct drm_connector *connector); /* parsing cmdline modes */ bool drm_mode_parse_command_line_for_connector(const char *mode_option, - struct drm_connector *connector, + const struct drm_connector *connector, struct drm_cmdline_mode *mode); struct drm_display_mode * drm_mode_create_from_cmdline_mode(struct drm_device *dev, -- cgit v1.2.3-55-g7522