[PATCH] initramfs_test: flag kunit_case __refdata to suppress warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We already have a comment regarding why .data -> .init references are
present for initramfs_test_cases[]. This allows us to suppress the
modpost warning.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202503050109.t5Ab93hX-lkp@xxxxxxxxx/
Suggested-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Signed-off-by: David Disseldorp <ddiss@xxxxxxx>
---

@Christian: feel free to squash this in with commit b6736cfccb582
("initramfs_test: kunit tests for initramfs unpacking") in your
vfs-6.15.initramfs branch if you like (and remove "These tests introduce
new modpost warnings..." from the commit msg).

 init/initramfs_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/initramfs_test.c b/init/initramfs_test.c
index 6231fe0125831..696fff583ee42 100644
--- a/init/initramfs_test.c
+++ b/init/initramfs_test.c
@@ -387,7 +387,7 @@ static void __init initramfs_test_many(struct kunit *test)
  * The kunit_case/_suite struct cannot be marked as __initdata as this will be
  * used in debugfs to retrieve results after test has run.
  */
-static struct kunit_case initramfs_test_cases[] = {
+static struct kunit_case __refdata initramfs_test_cases[] = {
 	KUNIT_CASE(initramfs_test_extract),
 	KUNIT_CASE(initramfs_test_fname_overrun),
 	KUNIT_CASE(initramfs_test_data),
-- 
2.43.0





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux