Skip to contentSkip to conversation

gfs2: make gfs2_fs_parameters static

PATCH In review Ben Dooks (Codethink) 3 participants 3 messages Oct 17, 2019 GFS2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gfs2: make gfs2_fs_parameters static

The gfs2_fs_parameters is not used outside the unit it is declared in, so make it static.

Fixes the following sparse warning:

fs/gfs2/ops_fstype.c:1331:39: warning: symbol 'gfs2_fs_parameters' was not declared. Should it be static?

---
Cc: Bob Peterson <[email protected]>
Cc: Andreas Gruenbacher <[email protected]>
Cc: cluster-devel at redhat.com
Cc: linux-kernel at vger.kernel.org

---
 fs/gfs2/ops_fstype.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/ops_fstype.c +1 -1
index 681b44682b0d..ebdef1c5f580 100644
@@ -1328,7 +1328,7 @@ static const struct fs_parameter_enum gfs2_param_enums[] = {
 	{}
 };
 
-const struct fs_parameter_description gfs2_fs_parameters = {
+static const struct fs_parameter_description gfs2_fs_parameters = {
 	.name = "gfs2",
 	.specs = gfs2_param_specs,
 	.enums = gfs2_param_enums,
Signature · 1 line
2.23.0
#1 lore raw
Quoted 23 lines · Ben Dooks (Codethink)

The gfs2_fs_parameters is not used outside the unit it is declared in, so make it static.

Fixes the following sparse warning:

fs/gfs2/ops_fstype.c:1331:39: warning: symbol 'gfs2_fs_parameters' was not declared. Should it be static?

---
Cc: Bob Peterson <[email protected]>
Cc: Andreas Gruenbacher <[email protected]>
Cc: cluster-devel at redhat.com
Cc: linux-kernel at vger.kernel.org

---
  fs/gfs2/ops_fstype.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/ops_fstype.c +0 -0
index 681b44682b0d..ebdef1c5f580 100644

fs/gfs2/ops_fstype.c static const struct fs_parameter_enum gfs2_param_enums[] = { · line 1334

Quoted 8 lines
fs/gfs2/ops_fstype.c +1 -1
@@ -1328,7 +1328,7 @@ static const struct fs_parameter_enum gfs2_param_enums[] = {
  	{}
  };
 
-const struct fs_parameter_description gfs2_fs_parameters = {
+static const struct fs_parameter_description gfs2_fs_parameters = {
  	.name = "gfs2",
  	.specs = gfs2_param_specs,
  	.enums = gfs2_param_enums,

Looks good to me.

Thanks,
Andy

#2 lore raw
Quoted 26 lines · Andrew Price
Quoted 25 lines · Ben Dooks (Codethink)

The gfs2_fs_parameters is not used outside the unit it is declared in, so make it static.

Fixes the following sparse warning:

fs/gfs2/ops_fstype.c:1331:39: warning: symbol 'gfs2_fs_parameters' was not declared. Should it be static?

---
Cc: Bob Peterson <[email protected]>
Cc: Andreas Gruenbacher <[email protected]>
Cc: cluster-devel at redhat.com
Cc: linux-kernel at vger.kernel.org

---
  fs/gfs2/ops_fstype.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/ops_fstype.c +0 -0
index 681b44682b0d..ebdef1c5f580 100644
@@ -1328,7 +1328,7 @@ static const struct fs_parameter_enum gfs2_param_enums[] = {
      {}
  };
 
Quoted 8 lines

fs/gfs2/ops_fstype.c static const struct fs_parameter_enum gfs2_param_enums[] = { · line 1334

Quoted 6 lines
fs/gfs2/ops_fstype.c +1 -1
-const struct fs_parameter_description gfs2_fs_parameters = {
+static const struct fs_parameter_description gfs2_fs_parameters = {
      .name = "gfs2",
      .specs = gfs2_param_specs,
      .enums = gfs2_param_enums,

Looks good to me.

Andy, I've added a reviewed-by tag for you and pushed this to for-next.

Thanks,
Andreas