2019-06-14 15:52:04

by Yue Haibing

[permalink] [raw]
Subject: [PATCH -next] ecryptfs: Make ecryptfs_xattr_handler static

Fix sparse warning:

fs/ecryptfs/inode.c:1138:28: warning:
symbol 'ecryptfs_xattr_handler' was not declared. Should it be static?

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
---
fs/ecryptfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 1e994d7..18426f4 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -1121,7 +1121,7 @@ static int ecryptfs_xattr_set(const struct xattr_handler *handler,
}
}

-const struct xattr_handler ecryptfs_xattr_handler = {
+static const struct xattr_handler ecryptfs_xattr_handler = {
.prefix = "", /* match anything */
.get = ecryptfs_xattr_get,
.set = ecryptfs_xattr_set,
--
2.7.4



2019-06-19 06:33:44

by Tyler Hicks

[permalink] [raw]
Subject: Re: [PATCH -next] ecryptfs: Make ecryptfs_xattr_handler static

On 2019-06-14 23:51:17, YueHaibing wrote:
> Fix sparse warning:
>
> fs/ecryptfs/inode.c:1138:28: warning:
> symbol 'ecryptfs_xattr_handler' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: YueHaibing <[email protected]>

Thanks for the cleanup! I've pushed this to the eCryptfs next branch.

Tyler

> ---
> fs/ecryptfs/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
> index 1e994d7..18426f4 100644
> --- a/fs/ecryptfs/inode.c
> +++ b/fs/ecryptfs/inode.c
> @@ -1121,7 +1121,7 @@ static int ecryptfs_xattr_set(const struct xattr_handler *handler,
> }
> }
>
> -const struct xattr_handler ecryptfs_xattr_handler = {
> +static const struct xattr_handler ecryptfs_xattr_handler = {
> .prefix = "", /* match anything */
> .get = ecryptfs_xattr_get,
> .set = ecryptfs_xattr_set,
> --
> 2.7.4
>
>