diff options
author | Kristaps Čivkulis <kristaps.civkulis@gmail.com> | 2018-08-05 18:21:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-05 20:16:32 +0200 |
commit | 2bc7596438aba6d9eacc4fdfac8dd8b22ae4a267 (patch) | |
tree | 05cf077da463bc11864a55bb395f563dfcc0daf8 /drivers/staging/erofs/xattr.c | |
parent | 1061bdba2fc395e4738315782655dd9b477b1f9f (diff) |
staging: erofs: fix if assignment style issue
Fix coding style issue "do not use assignment in if condition"
detected by checkpatch.pl.
Signed-off-by: Kristaps Čivkulis <kristaps.civkulis@gmail.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/erofs/xattr.c')
-rw-r--r-- | drivers/staging/erofs/xattr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/erofs/xattr.c b/drivers/staging/erofs/xattr.c index 6b9685fa601c..0e9cfeccdf99 100644 --- a/drivers/staging/erofs/xattr.c +++ b/drivers/staging/erofs/xattr.c @@ -288,8 +288,8 @@ static int inline_getxattr(struct inode *inode, struct getxattr_iter *it) remaining = ret; while (remaining) { - if ((ret = xattr_foreach(&it->it, - &find_xattr_handlers, &remaining)) >= 0) + ret = xattr_foreach(&it->it, &find_xattr_handlers, &remaining); + if (ret >= 0) break; } xattr_iter_end(&it->it, true); @@ -321,8 +321,8 @@ static int shared_getxattr(struct inode *inode, struct getxattr_iter *it) it->it.blkaddr = blkaddr; } - if ((ret = xattr_foreach(&it->it, - &find_xattr_handlers, NULL)) >= 0) + ret = xattr_foreach(&it->it, &find_xattr_handlers, NULL); + if (ret >= 0) break; } if (vi->xattr_shared_count) @@ -512,8 +512,8 @@ static int inline_listxattr(struct listxattr_iter *it) remaining = ret; while (remaining) { - if ((ret = xattr_foreach(&it->it, - &list_xattr_handlers, &remaining)) < 0) + ret = xattr_foreach(&it->it, &list_xattr_handlers, &remaining); + if (ret < 0) break; } xattr_iter_end(&it->it, true); @@ -544,8 +544,8 @@ static int shared_listxattr(struct listxattr_iter *it) it->it.blkaddr = blkaddr; } - if ((ret = xattr_foreach(&it->it, - &list_xattr_handlers, NULL)) < 0) + ret = xattr_foreach(&it->it, &list_xattr_handlers, NULL); + if (ret < 0) break; } if (vi->xattr_shared_count) |