erofs: correct indentation of an assigned structure inside a function
Subsystems (2)
PATCH 1/1 erofs: correct indentation of an assigned structure inside a function
Trivial change, the expected indentation ruled by the coding style hasn't been met.
Signed-off-by Vladimir Zapolskiy <[email protected]>
--- fs/erofs/xattr.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
fs/erofs/xattr.h +9 -8
@@ -46,18 +46,19 @@ extern const struct xattr_handler erofs_xattr_security_handler;static inline const struct xattr_handler *erofs_xattr_handler (unsigned int idx) { -static const struct xattr_handler *xattr_handler_map[] = { - [EROFS_XATTR_INDEX_USER ] = &erofs_xattr_user_handler, +static const struct xattr_handler *xattr_handler_map[] = { + [EROFS_XATTR_INDEX_USER ] = &erofs_xattr_user_handler, #ifdef CONFIG_EROFS_FS_POSIX_ACL - [EROFS_XATTR_INDEX_POSIX_ACL_ACCESS ] = &posix_acl_access_xattr_handler, - [EROFS_XATTR_INDEX_POSIX_ACL_DEFAULT ] = - &posix_acl_default_xattr_handler, + [EROFS_XATTR_INDEX_POSIX_ACL_ACCESS ] = + &posix_acl_access_xattr_handler, + [EROFS_XATTR_INDEX_POSIX_ACL_DEFAULT ] = + &posix_acl_default_xattr_handler, #endif - [EROFS_XATTR_INDEX_TRUSTED ] = &erofs_xattr_trusted_handler, + [EROFS_XATTR_INDEX_TRUSTED ] = &erofs_xattr_trusted_handler, #ifdef CONFIG_EROFS_FS_SECURITY - [EROFS_XATTR_INDEX_SECURITY ] = &erofs_xattr_security_handler, + [EROFS_XATTR_INDEX_SECURITY ] = &erofs_xattr_security_handler, #endif -}; + };return idx && idx <ARRAY_SIZE (xattr_handler_map) ? xattr_handler_map[idx] :NULL ;
Signature · 1 line
2.20.1
Quoted 43 lines · Vladimir Zapolskiy
Trivial change, the expected indentation ruled by the coding style hasn't been met.
Signed-off-by Vladimir Zapolskiy <[email protected]>--- fs/erofs/xattr.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)fs/erofs/xattr.h +9
-8@@ -46,18 +46,19 @@ extern const struct xattr_handler erofs_xattr_security_handler;static inline const struct xattr_handler *erofs_xattr_handler (unsigned int idx) { -static const struct xattr_handler *xattr_handler_map[] = { - [EROFS_XATTR_INDEX_USER ] = &erofs_xattr_user_handler, +static const struct xattr_handler *xattr_handler_map[] = { + [EROFS_XATTR_INDEX_USER ] = &erofs_xattr_user_handler, #ifdef CONFIG_EROFS_FS_POSIX_ACL - [EROFS_XATTR_INDEX_POSIX_ACL_ACCESS ] = &posix_acl_access_xattr_handler, - [EROFS_XATTR_INDEX_POSIX_ACL_DEFAULT ] = - &posix_acl_default_xattr_handler, + [EROFS_XATTR_INDEX_POSIX_ACL_ACCESS ] = + &posix_acl_access_xattr_handler, + [EROFS_XATTR_INDEX_POSIX_ACL_DEFAULT ] = + &posix_acl_default_xattr_handler, #endif - [EROFS_XATTR_INDEX_TRUSTED ] = &erofs_xattr_trusted_handler, + [EROFS_XATTR_INDEX_TRUSTED ] = &erofs_xattr_trusted_handler, #ifdef CONFIG_EROFS_FS_SECURITY - [EROFS_XATTR_INDEX_SECURITY ] = &erofs_xattr_security_handler, + [EROFS_XATTR_INDEX_SECURITY ] = &erofs_xattr_security_handler, #endif -}; + };return idx && idx <ARRAY_SIZE (xattr_handler_map) ? xattr_handler_map[idx] :NULL ;Signature · 1 line
2.20.1
Thanks, will apply for linux-next.
Thanks,
Gao Xiang
Quoted 4 lines · Vladimir Zapolskiy
Trivial change, the expected indentation ruled by the coding style hasn't been met.
Signed-off-by Vladimir Zapolskiy <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,