Skip to contentSkip to conversation

ovl: mark ovl_redirect_mode() as static again

PATCH In review Arnd Bergmann 2 participants 2 messages Jul 3, 2023 Overlay filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ovl: mark ovl_redirect_mode() as static again

From: Arnd Bergmann <[email protected]>

This function was moved to another file and is no longer marked static there, causing a W=1 warning:

fs/overlayfs/params.c:92:13: error: no previous prototype for 'ovl_redirect_mode' [-Werror=missing-prototypes]

This was probably lost by accident during the refactoring, as there is still no caller in another file, so add back the annotation.

Fixes 06bcaa2dafb7e ("ovl: move all parameter handling into params.{c,h}")
---
 fs/overlayfs/params.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/overlayfs/params.c +1 -1
index b8c2f6056a9a8..a63160dbb0f95 100644
@@ -89,7 +89,7 @@ const struct constant_table ovl_parameter_redirect_dir[] = {
 	{}
 };
 
-const char *ovl_redirect_mode(struct ovl_config *config)
+static const char *ovl_redirect_mode(struct ovl_config *config)
 {
 	return ovl_parameter_redirect_dir[config->redirect_mode].name;
 }
Signature · 1 line
2.39.2
maintainer
#1 lore raw
Quoted 6 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

This function was moved to another file and is no longer marked static there, causing a W=1 warning:

Quoted 8 lines

fs/overlayfs/params.c:92:13: error: no previous prototype for 'ovl_redirect_mode' [-Werror=missing-prototypes]

This was probably lost by accident during the refactoring, as there is still no caller in another file, so add back the annotation.

Fixes 06bcaa2dafb7e ("ovl: move all parameter handling into params.{c,h}")

---

This is against a patch that is not upstream.
I will squash it.

Thanks,
Amir.

Quoted 19 lines
 fs/overlayfs/params.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/overlayfs/params.c +1 -2
index b8c2f6056a9a8..a63160dbb0f95 100644
@@ -89,7 +89,7 @@ const struct constant_table ovl_parameter_redirect_dir[] = {
        {}
 };
 
-const char *ovl_redirect_mode(struct ovl_config *config)
+static const char *ovl_redirect_mode(struct ovl_config *config)
 {
        return ovl_parameter_redirect_dir[config->redirect_mode].name;
 }
--

2.39.2