All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] lib: kunit: Suppress a compilation warning of frame size
@ 2021-05-18  9:45 Zhen Lei
  2021-05-18 21:38 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Zhen Lei @ 2021-05-18  9:45 UTC (permalink / raw)
  To: Andrew Morton, Shuah Khan, Vitor Massaru Iha, linux-kernel; +Cc: Zhen Lei

lib/bitfield_kunit.c: In function ‘test_bitfields_constants’:
lib/bitfield_kunit.c:93:1: warning: the frame size of 7456 bytes is larger than 2048 bytes [-Wframe-larger-than=]
 }
 ^

As the description of BITFIELD_KUNIT in lib/Kconfig.debug, it "Only useful
for kernel devs running the KUnit test harness, and not intended for
inclusion into a production build". Therefore, it is not worth modifying
variable 'test_bitfields_constants' to clear this warning. Just suppress
it.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 lib/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Makefile b/lib/Makefile
index e11cfc18b6c0826..2cc359ec1fdd3e1 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -348,6 +348,7 @@ obj-$(CONFIG_OBJAGG) += objagg.o
 obj-$(CONFIG_PLDMFW) += pldmfw/
 
 # KUnit tests
+CFLAGS_bitfield_kunit.o := $(call cc-option,-Wframe-larger-than=10240)
 obj-$(CONFIG_BITFIELD_KUNIT) += bitfield_kunit.o
 obj-$(CONFIG_LIST_KUNIT_TEST) += list-test.o
 obj-$(CONFIG_LINEAR_RANGES_TEST) += test_linear_ranges.o
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-18 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-18  9:45 [PATCH 1/1] lib: kunit: Suppress a compilation warning of frame size Zhen Lei
2021-05-18 21:38 ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.