]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fbdev: omapfb: avoid stack overflow warning
authorArnd Bergmann <arnd@arndb.de>
Thu, 15 Dec 2022 17:02:28 +0000 (18:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:24:32 +0000 (07:24 +0100)
commit4e18618ced3b3f79432f2428ac88bbedc6e6c955
treed2dcf6f31e046c3d6f1945c061ba255d339b00be
parentb019db2fcf09bc087bd46cf4178256aac5538ab4
fbdev: omapfb: avoid stack overflow warning

[ Upstream commit 634cf6ead93988b0da9ac054521ab63a3ba189db ]

The dsi_irq_stats structure is a little too big to fit on the
stack of a 32-bit task, depending on the specific gcc options:

fbdev/omap2/omapfb/dss/dsi.c: In function 'dsi_dump_dsidev_irqs':
fbdev/omap2/omapfb/dss/dsi.c:1621:1: error: the frame size of 1064 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Since this is only a debugfs file, performance is not critical,
so just dynamically allocate it, and print an error message
in there in place of a failure code when the allocation fails.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/video/fbdev/omap2/omapfb/dss/dsi.c