Skip to contentSkip to conversation

kernfs: Declare two local data structures static

PATCH New Bart Van Assche 1 participant 1 message Nov 12, 2016 kernfs

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernfs: Declare two local data structures static

This was spotted by the 'sparse' static checker.

Cc Andreas Gruenbacher <[email protected]>
---
 fs/kernfs/inode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/kernfs/inode.c +2 -2
index a198211..ac9e108 100644
@@ -335,7 +335,7 @@ static int kernfs_xattr_set(const struct xattr_handler *handler,
 	return simple_xattr_set(&attrs->xattrs, name, value, size, flags);
 }
 
-const struct xattr_handler kernfs_trusted_xattr_handler = {
+static const struct xattr_handler kernfs_trusted_xattr_handler = {
 	.prefix = XATTR_TRUSTED_PREFIX,
 	.get = kernfs_xattr_get,
 	.set = kernfs_xattr_set,
@@ -372,7 +372,7 @@ static int kernfs_security_xattr_set(const struct xattr_handler *handler,
 	return error;
 }
 
-const struct xattr_handler kernfs_security_xattr_handler = {
+static const struct xattr_handler kernfs_security_xattr_handler = {
 	.prefix = XATTR_SECURITY_PREFIX,
 	.get = kernfs_xattr_get,
 	.set = kernfs_security_xattr_set,
Signature · 1 line
2.10.1