Skip to contentSkip to conversation

ceph: fix non static symbol warning

PATCH Applied Wei Yongjun 2 participants 2 messages Oct 17, 2016 – Oct 18, 2016 Ceph client

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ceph: fix non static symbol warning

From: Wei Yongjun <[email protected]>

Fixes the following sparse warning:

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

---
 fs/ceph/xattr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/ceph/xattr.c +2 -2
index 40b7032..febc28f 100644
@@ -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,
maintainer Applied
#1 lore raw
Quoted 26 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Fixes the following sparse warning:

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

---
 fs/ceph/xattr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/ceph/xattr.c +1 -1
index 40b7032..febc28f 100644
@@ -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

fs/ceph/xattr.c static int ceph_set_xattr_handler(const struct xattr_handler *handler, · line 1092

Quoted 8 lines
fs/ceph/xattr.c +1 -1
@@ -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