diff mbox

[-next] ceph: fix non static symbol warning

Message ID 1476717089-10359-1-git-send-email-weiyj.lk@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Yongjun Oct. 17, 2016, 3:11 p.m. UTC
From: Wei Yongjun <weiyongjun1@huawei.com>

Fixes the following sparse warning:

fs/ceph/xattr.c:19:28: warning:
 symbol 'ceph_other_xattr_handler' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 fs/ceph/xattr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)




--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Ilya Dryomov Oct. 18, 2016, 10:33 a.m. UTC | #1
On Mon, Oct 17, 2016 at 5:11 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Fixes the following sparse warning:
>
> fs/ceph/xattr.c:19:28: warning:
>  symbol 'ceph_other_xattr_handler' was not declared. Should it be static?
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  fs/ceph/xattr.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
> index 40b7032..febc28f 100644
> --- a/fs/ceph/xattr.c
> +++ b/fs/ceph/xattr.c
> @@ -16,7 +16,7 @@
>  static int __remove_xattr(struct ceph_inode_info *ci,
>                           struct ceph_inode_xattr *xattr);
>
> -const struct xattr_handler ceph_other_xattr_handler;
> +static const struct xattr_handler ceph_other_xattr_handler;
>
>  /*
>   * List of handlers for synthetic system.* attributes. Other
> @@ -1086,7 +1086,7 @@ static int ceph_set_xattr_handler(const struct xattr_handler *handler,
>         return __ceph_setxattr(inode, name, value, size, flags);
>  }
>
> -const struct xattr_handler ceph_other_xattr_handler = {
> +static const struct xattr_handler ceph_other_xattr_handler = {
>         .prefix = "",  /* match any name => handlers called with full name */
>         .get = ceph_get_xattr_handler,
>         .set = ceph_set_xattr_handler,

Applied.

Thanks,

                Ilya
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index 40b7032..febc28f 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -16,7 +16,7 @@ 
 static int __remove_xattr(struct ceph_inode_info *ci,
 			  struct ceph_inode_xattr *xattr);
 
-const struct xattr_handler ceph_other_xattr_handler;
+static const struct xattr_handler ceph_other_xattr_handler;
 
 /*
  * List of handlers for synthetic system.* attributes. Other
@@ -1086,7 +1086,7 @@  static int ceph_set_xattr_handler(const struct xattr_handler *handler,
 	return __ceph_setxattr(inode, name, value, size, flags);
 }
 
-const struct xattr_handler ceph_other_xattr_handler = {
+static const struct xattr_handler ceph_other_xattr_handler = {
 	.prefix = "",  /* match any name => handlers called with full name */
 	.get = ceph_get_xattr_handler,
 	.set = ceph_set_xattr_handler,