lib/test_lockup.c: make test_inode static
PATCH 1/1 lib/test_lockup.c: make test_inode static
Fix the following sparse warning:
lib/test_lockup.c:145:14: warning: symbol 'test_inode' was not declared. Should it be static?
Reported-by Hulk Robot <[email protected]>
Signed-off-by Jason Yan <[email protected]>
--- lib/test_lockup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/test_lockup.c +1 -1
@@ -142,7 +142,7 @@ module_param(reallocate_pages, bool, 0400);MODULE_PARM_DESC (reallocate_pages,"free and allocate pages between iterations" );struct file *test_file; -struct inode *test_inode; +static struct inode *test_inode;static char test_file_path[256 ];module_param_string (file_path, test_file_path,sizeof (test_file_path),0400 );MODULE_PARM_DESC (file_path,"file path to test" );
Signature · 1 line
2.21.1
Quoted 4 lines · Jason Yan
Fix the following sparse warning:
lib/test_lockup.c:145:14: warning: symbol 'test_inode' was not declared. Should it be static?
Yep, but that's not so important.
Quoted 12 lines
Reported-by Hulk Robot <[email protected]>Signed-off-by Jason Yan <[email protected]>--- lib/test_lockup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/test_lockup.c +0
-0
lib/test_lockup.c module_param(reallocate_pages, bool, 0400); · line 144
Quoted 3 lines
lib/test_lockup.c +0
-0@@ -142,7 +142,7 @@ module_param(reallocate_pages, bool, 0400);MODULE_PARM_DESC (reallocate_pages,"free and allocate pages between iterations" );struct file *test_file;
Why you're fixing only this warning? =)test_file above should generate the same.
Quoted 6 lines
lib/test_lockup.c +1
-1-struct inode *test_inode; +static struct inode *test_inode;static char test_file_path[256 ];module_param_string (file_path, test_file_path,sizeof (test_file_path),0400 );MODULE_PARM_DESC (file_path,"file path to test" );