diff mbox series

[RFC,3/3] thunderbolt: build kunit tests without structleak plugin

Message ID 20210125124533.101339-4-arnd@kernel.org
State New
Headers show
Series None | expand

Commit Message

Arnd Bergmann Jan. 25, 2021, 12:45 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>


The structleak plugin causes the stack frame size to grow immensely:

drivers/thunderbolt/test.c:1529:1: error: the frame size of 1176 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Turn it off in this file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/thunderbolt/Makefile | 1 +
 1 file changed, 1 insertion(+)

-- 
2.29.2

Comments

Mika Westerberg Jan. 27, 2021, 12:53 p.m. UTC | #1
Hi Arnd,

On Mon, Jan 25, 2021 at 01:45:28PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The structleak plugin causes the stack frame size to grow immensely:
> 
> drivers/thunderbolt/test.c:1529:1: error: the frame size of 1176 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
> 
> Turn it off in this file.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

To me this is a reasonable work around so I can pick this up to
Thunderbolt tree if no objections.

Thanks BTW, for doing this. I got a report from buildbot some time ago
about the this but did not have time to figure out how to fix it :)
diff mbox series

Patch

diff --git a/drivers/thunderbolt/Makefile b/drivers/thunderbolt/Makefile
index 7aa48f6c41d9..e571c0495a84 100644
--- a/drivers/thunderbolt/Makefile
+++ b/drivers/thunderbolt/Makefile
@@ -7,6 +7,7 @@  thunderbolt-objs += nvm.o retimer.o quirks.o
 thunderbolt-${CONFIG_ACPI} += acpi.o
 thunderbolt-$(CONFIG_DEBUG_FS) += debugfs.o
 thunderbolt-${CONFIG_USB4_KUNIT_TEST} += test.o
+CFLAGS_REMOVE_test.o += -fplugin-arg-structleak_plugin-byref -fplugin-arg-structleak_plugin-byref-all
 
 thunderbolt_dma_test-${CONFIG_USB4_DMA_TEST} += dma_test.o
 obj-$(CONFIG_USB4_DMA_TEST) += thunderbolt_dma_test.o