ext4: Fix sparse warning in extents kunit test when EXT4_KUNIT_TESTS=m
Ojaswin Mujoo
reviewerPATCH v2 1/1 ext4: Fix sparse warning in extents kunit test when EXT4_KUNIT_TESTS=m
When kunit tests are compiled as modules, the extents kunit test emits a sparse warning:
Quoted 1 line
Quoted 1 line
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.
--- fs/ext4/extents-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/extents-test.c +1 -1
@@ -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 */
Signature · 1 line
2.55.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 8 lines
When kunit tests are compiled as modules, the extents kunit test emits a sparse warning:
Quoted 1 line
Quoted 1 line
fs/ext4/extents-test.c:59:3: sparse: sparse: symbol 'k_ctx' was notdeclared. Should it be static?
Fix this by declaring it as static.
Quoted 7 lines
Fixes cb1e0c1d1fad ("ext4: kunit tests for extent splitting and conversion")Reported-by kernel test robot <[email protected]>Reviewed-by Baokun Li <[email protected]>Reviewed-by Zhang Yi <[email protected]>Reviewed-by Jan Kara <[email protected]>Signed-off-by Ojaswin Mujoo <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Ojaswin Mujoo
reviewerQuoted 8 lines · Ojaswin Mujoo
When kunit tests are compiled as modules, the extents kunit test emits a sparse warning:
Quoted 1 line
Quoted 1 line
fs/ext4/extents-test.c:59:3: sparse: sparse: symbol 'k_ctx' was notdeclared. Should it be static?
Fix this by declaring it as static.
Quoted 7 lines
Fixes cb1e0c1d1fad ("ext4: kunit tests for extent splitting and conversion")Reported-by kernel test robot <[email protected]>Reviewed-by Baokun Li <[email protected]>Reviewed-by Zhang Yi <[email protected]>Reviewed-by Jan Kara <[email protected]>Signed-off-by Ojaswin Mujoo <[email protected]>
Hi Ted,
A gentle ping on this small fix.
Regards,
ojaswin
Quoted 20 lines
--- fs/ext4/extents-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ext4/extents-test.c +1
-1@@ -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 */Signature · 1 line
2.55.0