ext4: Fix sparse warning in extents kunit test when EXT4_KUNIT_TESTS=m
Ojaswin Mujoo
reviewerPATCH 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 11 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.
Fixes cb1e0c1d1fad ("ext4: kunit tests for extent splitting and conversion")Reported-by kernel test robot <[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
Quoted 11 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.
Fixes cb1e0c1d1fad ("ext4: kunit tests for extent splitting and conversion")Reported-by kernel test robot <[email protected]>
Looks good. Feel free to add:
Honza
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
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 11 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.
Fixes cb1e0c1d1fad ("ext4: kunit tests for extent splitting and conversion")Reported-by kernel test robot <[email protected]>
Looks good to me.
Quoted 17 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 */
Hi Ojaswin,
Quoted 2 lines · Ojaswin Mujoo
When kunit tests are compiled as modules, the extents kunit test emits a sparse warning:
This is not module-specific, it also shows up with EXT4_KUNIT_TESTS=y, so maybe the "=m" can be dropped.
Quoted 8 lines
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.
Fixes cb1e0c1d1fad ("ext4: kunit tests for extent splitting and conversion")Reported-by kernel test robot <[email protected]>
Missing Signed-off-by, otherwise looks good to me.
Quoted 17 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 */
Ojaswin Mujoo
reviewerQuoted 12 lines · Baokun Li
Hi Ojaswin,
Quoted 2 lines · Ojaswin Mujoo
When kunit tests are compiled as modules, the extents kunit test emits a sparse warning:
This is not module-specific, it also shows up with EXT4_KUNIT_TESTS=y, so maybe the "=m" can be dropped.
Quoted 3 lines
Quoted 1 line
Quoted 1 line
fs/ext4/extents-test.c:59:3: sparse: sparse: symbol 'k_ctx' was notdeclared. Should it be static?
Quoted 8 lines
Quoted 5 lines
Fix this by declaring it as static.
Fixes cb1e0c1d1fad ("ext4: kunit tests for extent splitting and conversion")Reported-by kernel test robot <[email protected]>Missing Signed-off-by, otherwise looks good to me.
Ahh idk how that got missed :) Thanks I'll fix it.
Regards,
ojaswin
Quoted 23 lines
Reviewed-by Baokun Li <[email protected]>Quoted 17 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 */