When kunit tests are compiled as modules, the extents kunit test emits
a sparse warning:
>> fs/ext4/extents-test.c:59:3: sparse: sparse: symbol 'k_ctx' was not
declared. Should it be static?
Fix this by declaring it as static.
Fixes: cb1e0c1d1fad ("ext4: kunit tests for extent splitting and conversion")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202609221900.Pgwrcp41-lkp@intel.com/
Reviewed-by: Baokun Li <libaokun@linux.alibaba.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
---
fs/ext4/extents-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/extents-test.c b/fs/ext4/extents-test.c
index bd7795a82607..9669b2197fca 100644
--- a/fs/ext4/extents-test.c
+++ b/fs/ext4/extents-test.c
@@ -48,7 +48,7 @@
#define EXT_DATA_LBLK 10
#define EXT_DATA_LEN 3
-struct kunit_ctx {
+static struct kunit_ctx {
/*
* Ext4 inode which has only 1 unwrit extent
*/
--
2.55.0