[PATCH] drm/selftests: reduce stack usage

Maxime Ripard maxime.ripard at bootlin.com
Mon Jul 1 07:51:29 UTC 2019


On Fri, Jun 28, 2019 at 02:16:45PM +0200, Arnd Bergmann wrote:
> 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 <arnd at arndb.de>

Applied, thanks!
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190701/80fdd2f0/attachment.sig>


More information about the dri-devel mailing list