Skip to contentSkip to conversation

fs: Add function declaration of simple_dname

PATCH New Leon Romanovsky 1 participant 1 message Aug 19, 2020 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: Add function declaration of simple_dname

From: Leon Romanovsky <[email protected]>

The simple_dname() is declared in internal header file but the declaration is missing in d_path.c.

The compilation with W=1 generates the following GCC warning.

fs/d_path.c:311:7: warning: no previous prototype for 'simple_dname' [-Wmissing-prototypes]
311 | char *simple_dname(struct dentry *dentry, char *buffer, int buflen)

      |       ^~~~~~~~~~~~
Fixes 7e5f7bb08b8c ("unexport simple_dname()")

---
Changelog:
v1: Dropped "extern" removal chunk
v0: https://lore.kernel.org/lkml/[email protected]/

---
 fs/d_path.c | 2 ++
 1 file changed, 2 insertions(+)
fs/d_path.c +2 -0
index 0f1fc1743302..4b89448cc78e 100644
@@ -8,6 +8,8 @@
 #include <linux/prefetch.h>
 #include "mount.h"
 
+#include "internal.h"
+
 static int prepend(char **buffer, int *buflen, const char *str, int namelen)
 {
 	*buflen -= namelen;

--
2.26.2