Skip to contentSkip to conversation

staging/erofs: fix sparse's warnings on undeclared symbols in erofs

PATCH In review Bo YU 2 participants 4 messages Feb 21, 2019 – Feb 22, 2019 Staging

lore
Share & tools
lore

Bo YU

author
#0 lore raw

PATCH 1/1 staging/erofs: fix sparse's warnings on undeclared symbols in erofs

From: Bo Yu <[email protected]>

Fix sparse warnings:

drivers/staging/erofs/utils.c:134:6: warning: symbol 'erofs_try_to_release_workgroup' was not declared. Should it be static?

Fixes 51232df5e4b26("staging: erofs: fix race when the managed cache is enabled")
Cc Gao Xiang <gaoxiang25 at huawei.com>
Cc Chao Yu <yuchao0 at huawei.com>
CC Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Signed-off-by Bo Yu <tsu.yubo at gmail.com>
---
 drivers/staging/erofs/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/erofs/utils.c +1 -1
index b535898ca753..33cd5ad55cb8 100644
@@ -131,7 +131,7 @@ static void erofs_workgroup_unfreeze_final(struct erofs_workgroup *grp)
 	__erofs_workgroup_free(grp);
 }
 
-bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
+static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
 				    struct erofs_workgroup *grp,
 				    bool cleanup)
 {
Signature · 1 line
2.11.0
#1 lore raw

Hi Bo,

Quoted 22 lines · Bo YU

From: Bo Yu <tsu.yubo at gmail.com>

Fix sparse warnings:

drivers/staging/erofs/utils.c:134:6: warning: symbol 'erofs_try_to_release_workgroup' was not declared. Should it be static?

Fixes 51232df5e4b26("staging: erofs: fix race when the managed cache is enabled")
Cc Gao Xiang <gaoxiang25 at huawei.com>
Cc Chao Yu <yuchao0 at huawei.com>
CC Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Signed-off-by Bo Yu <tsu.yubo at gmail.com>
---
 drivers/staging/erofs/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/erofs/utils.c +0 -0
index b535898ca753..33cd5ad55cb8 100644

drivers/staging/erofs/utils.c static void erofs_workgroup_unfreeze_final(struct erofs_workgroup *grp) · line 137

Quoted 8 lines
drivers/staging/erofs/utils.c +1 -1
@@ -131,7 +131,7 @@ static void erofs_workgroup_unfreeze_final(struct erofs_workgroup *grp)
 	__erofs_workgroup_free(grp);
 }
 
-bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
+static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
 				    struct erofs_workgroup *grp,
 				    bool cleanup)
 {

Have you looked the latest kernel code?
It seems erofs_try_to_release_workgroup is already be claimed as static...

See:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/erofs/utils.c?h=staging-next#n148

Thanks,
Gao Xiang

author
#2 lore raw

Hi,

Quoted 27 lines · Gao Xiang

Hi Bo,

Quoted 24 lines · Bo YU

From: Bo Yu <tsu.yubo at gmail.com>

Fix sparse warnings:

drivers/staging/erofs/utils.c:134:6: warning: symbol 'erofs_try_to_release_workgroup' was not declared. Should it be static?

Fixes 51232df5e4b26("staging: erofs: fix race when the managed cache is enabled")
Cc Gao Xiang <gaoxiang25 at huawei.com>
Cc Chao Yu <yuchao0 at huawei.com>
CC Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Signed-off-by Bo Yu <tsu.yubo at gmail.com>
---
 drivers/staging/erofs/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/erofs/utils.c +0 -0
index b535898ca753..33cd5ad55cb8 100644
@@ -131,7 +131,7 @@ static void erofs_workgroup_unfreeze_final(struct erofs_workgroup *grp)
 	__erofs_workgroup_free(grp);
 }
 
Quoted 8 lines

drivers/staging/erofs/utils.c static void erofs_workgroup_unfreeze_final(struct erofs_workgroup *grp) · line 137

Quoted 6 lines
drivers/staging/erofs/utils.c +1 -1
-bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
+static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
 				    struct erofs_workgroup *grp,
 				    bool cleanup)
 {

Have you looked the latest kernel code?

Emm...yeah.But i pulled linus tree not staging tree :( Sorry for the noise.

Quoted 8 lines

It seems erofs_try_to_release_workgroup is already be claimed as static...

See:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/erofs/utils.c?h=staging-next#n148

Thanks,
Gao Xiang

#3 lore raw
Quoted 37 lines · YU Bo

Hi,

Quoted 27 lines · Gao Xiang

Hi Bo,

Quoted 24 lines · Bo YU

From: Bo Yu <tsu.yubo at gmail.com>

Fix sparse warnings:

drivers/staging/erofs/utils.c:134:6: warning: symbol 'erofs_try_to_release_workgroup' was not declared. Should it be static?

Fixes 51232df5e4b26("staging: erofs: fix race when the managed cache is enabled")
Cc Gao Xiang <gaoxiang25 at huawei.com>
Cc Chao Yu <yuchao0 at huawei.com>
CC Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Signed-off-by Bo Yu <tsu.yubo at gmail.com>

---
?drivers/staging/erofs/utils.c | 2 +-
?1 file changed, 1 insertion(+), 1 deletion(-)

drivers/staging/erofs/utils.c +0 -0
index b535898ca753..33cd5ad55cb8 100644
@@ -131,7 +131,7 @@ static void erofs_workgroup_unfreeze_final(struct erofs_workgroup *grp)
 ???? __erofs_workgroup_free(grp);
 ?}
 
Quoted 8 lines

drivers/staging/erofs/utils.c static void erofs_workgroup_unfreeze_final(struct erofs_workgroup *grp) · line 137

Quoted 6 lines
drivers/staging/erofs/utils.c +1 -1
-bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
+static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
 ???????????????????? struct erofs_workgroup *grp,
 ???????????????????? bool cleanup)
 ?{

Have you looked the latest kernel code?

Quoted 2 lines

Emm...yeah.But i pulled linus tree not staging tree :( Sorry for the noise.

That is ok. staging tree or linux-next includes the latest source code, you can check them out :)

Thanks,
Gao Xiang

Quoted 9 lines
Quoted 9 lines

It seems erofs_try_to_release_workgroup is already be claimed as static...

See:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/erofs/utils.c?h=staging-next#n148

Thanks,
Gao Xiang