2022-03-17 04:23:58

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH] namei: make filename_parentat static

This symbol is not used outside of namei.c, so marks it static.

Fix the following w1 warning:

fs/namei.c:2587:5: warning: no previous prototype for
‘filename_parentat’ [-Wmissing-prototypes].

Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
---
fs/namei.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/namei.c b/fs/namei.c
index 44c366f3152f..fe3525807361 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2584,7 +2584,7 @@ static int __filename_parentat(int dfd, struct filename *name,
return retval;
}

-int filename_parentat(int dfd, struct filename *name, unsigned int flags,
+static int filename_parentat(int dfd, struct filename *name, unsigned int flags,
struct path *parent, struct qstr *last, int *type)
{
return __filename_parentat(dfd, name, flags, parent, last, type, NULL);
--
2.20.1.7.g153144c


2022-03-21 23:15:25

by Stephen Brennan

[permalink] [raw]
Subject: Re: [PATCH] namei: make filename_parentat static

Jiapeng Chong <[email protected]> writes:
> This symbol is not used outside of namei.c, so marks it static.
>
> Fix the following w1 warning:
>
> fs/namei.c:2587:5: warning: no previous prototype for
> ‘filename_parentat’ [-Wmissing-prototypes].
>
> Reported-by: Abaci Robot <[email protected]>
> Signed-off-by: Jiapeng Chong <[email protected]>
> ---
> fs/namei.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/namei.c b/fs/namei.c
> index 44c366f3152f..fe3525807361 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -2584,7 +2584,7 @@ static int __filename_parentat(int dfd, struct filename *name,
> return retval;
> }
>
> -int filename_parentat(int dfd, struct filename *name, unsigned int flags,
> +static int filename_parentat(int dfd, struct filename *name, unsigned int flags,
> struct path *parent, struct qstr *last, int *type)
> {
> return __filename_parentat(dfd, name, flags, parent, last, type, NULL);

You must have based this on something other than the latest upstream
tree. Currently on v5.17 we have:

2559 static int filename_parentat(int dfd, struct filename *name,
2560 unsigned int flags, struct path *parent,
2561 struct qstr *last, int *type)

Regards,
Stephen

> --
> 2.20.1.7.g153144c