summaryrefslogtreecommitdiffstats
path: root/include/linux/xattr_compat.h
diff options
context:
space:
mode:
authorMichael Kjorling <[email protected]>2013-11-01 20:26:11 +0100
committerBrian Behlendorf <[email protected]>2013-12-18 16:46:35 -0800
commitd1d7e2689db9e03f11c069ebc9f1ba12829e5dac (patch)
tree75b9a2b23334d5f673fb31f142f74146d351865c /include/linux/xattr_compat.h
parent8ffef572ed2ba97e0c2d6a8aa2240012e611dc6f (diff)
cstyle: Resolve C style issues
The vast majority of these changes are in Linux specific code. They are the result of not having an automated style checker to validate the code when it was originally written. Others were caused when the common code was slightly adjusted for Linux. This patch contains no functional changes. It only refreshes the code to conform to style guide. Everyone submitting patches for inclusion upstream should now run 'make checkstyle' and resolve any warning prior to opening a pull request. The automated builders have been updated to fail a build if when 'make checkstyle' detects an issue. Signed-off-by: Brian Behlendorf <[email protected]> Closes #1821
Diffstat (limited to 'include/linux/xattr_compat.h')
-rw-r--r--include/linux/xattr_compat.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/include/linux/xattr_compat.h b/include/linux/xattr_compat.h
index f06ba1fa0..a7371f946 100644
--- a/include/linux/xattr_compat.h
+++ b/include/linux/xattr_compat.h
@@ -24,7 +24,7 @@
*/
#ifndef _ZFS_XATTR_H
-#define _ZFS_XATTR_H
+#define _ZFS_XATTR_H
#include <linux/posix_acl_xattr.h>
@@ -47,19 +47,19 @@ typedef struct xattr_handler xattr_handler_t;
* instead of an inode, and a handler_flags argument was added.
*/
#ifdef HAVE_DENTRY_XATTR_GET
-#define ZPL_XATTR_GET_WRAPPER(fn) \
+#define ZPL_XATTR_GET_WRAPPER(fn) \
static int \
fn(struct dentry *dentry, const char *name, void *buffer, size_t size, \
int unused_handler_flags) \
{ \
- return __ ## fn(dentry->d_inode, name, buffer, size); \
+ return (__ ## fn(dentry->d_inode, name, buffer, size)); \
}
#else
-#define ZPL_XATTR_GET_WRAPPER(fn) \
+#define ZPL_XATTR_GET_WRAPPER(fn) \
static int \
fn(struct inode *ip, const char *name, void *buffer, size_t size) \
{ \
- return __ ## fn(ip, name, buffer, size); \
+ return (__ ## fn(ip, name, buffer, size)); \
}
#endif /* HAVE_DENTRY_XATTR_GET */
@@ -69,28 +69,28 @@ fn(struct inode *ip, const char *name, void *buffer, size_t size) \
* instead of an inode, and a handler_flags argument was added.
*/
#ifdef HAVE_DENTRY_XATTR_SET
-#define ZPL_XATTR_SET_WRAPPER(fn) \
+#define ZPL_XATTR_SET_WRAPPER(fn) \
static int \
fn(struct dentry *dentry, const char *name, const void *buffer, \
size_t size, int flags, int unused_handler_flags) \
{ \
- return __ ## fn(dentry->d_inode, name, buffer, size, flags); \
+ return (__ ## fn(dentry->d_inode, name, buffer, size, flags)); \
}
#else
-#define ZPL_XATTR_SET_WRAPPER(fn) \
+#define ZPL_XATTR_SET_WRAPPER(fn) \
static int \
fn(struct inode *ip, const char *name, const void *buffer, \
size_t size, int flags) \
{ \
- return __ ## fn(ip, name, buffer, size, flags); \
+ return (__ ## fn(ip, name, buffer, size, flags)); \
}
#endif /* HAVE_DENTRY_XATTR_SET */
#ifdef HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY
-#define zpl_security_inode_init_security(ip, dip, qstr, nm, val, len) \
+#define zpl_security_inode_init_security(ip, dip, qstr, nm, val, len) \
security_inode_init_security(ip, dip, qstr, nm, val, len)
#else
-#define zpl_security_inode_init_security(ip, dip, qstr, nm, val, len) \
+#define zpl_security_inode_init_security(ip, dip, qstr, nm, val, len) \
security_inode_init_security(ip, dip, nm, val, len)
#endif /* HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY */
@@ -103,27 +103,27 @@ fn(struct inode *ip, const char *name, const void *buffer, \
static inline struct posix_acl *
zpl_acl_from_xattr(const void *value, int size)
{
- return posix_acl_from_xattr(CRED()->user_ns, value, size);
+ return (posix_acl_from_xattr(CRED()->user_ns, value, size));
}
static inline int
zpl_acl_to_xattr(struct posix_acl *acl, void *value, int size)
{
- return posix_acl_to_xattr(CRED()->user_ns,acl, value, size);
+ return (posix_acl_to_xattr(CRED()->user_ns, acl, value, size));
}
#else
static inline struct posix_acl *
-zpl_acl_from_xattr(const void *value,int size)
+zpl_acl_from_xattr(const void *value, int size)
{
- return posix_acl_from_xattr(value, size);
+ return (posix_acl_from_xattr(value, size));
}
static inline int
zpl_acl_to_xattr(struct posix_acl *acl, void *value, int size)
{
- return posix_acl_to_xattr(acl, value, size);
+ return (posix_acl_to_xattr(acl, value, size));
}
#endif /* HAVE_POSIX_ACL_FROM_XATTR_USERNS */