From: "Kristaps Čivkulis" <kristaps.civkulis@gmail.com>
To: gaoxiang25@huawei.com, yuchao0@huawei.com,
gregkh@linuxfoundation.org, linux-erofs@lists.ozlabs.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: erofs: fix if assignment style issue
Date: Sun, 5 Aug 2018 18:21:01 +0300 [thread overview]
Message-ID: <20180805152101.11657-1-kristaps.civkulis@gmail.com> (raw)
Fix coding style issue "do not use assignment in if condition"
detected by checkpatch.pl.
Signed-off-by: Kristaps Čivkulis <kristaps.civkulis@gmail.com>
---
drivers/staging/erofs/unzip_vle.c | 3 ++-
drivers/staging/erofs/xattr.c | 16 ++++++++--------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
index 1030ca5c2dc3..45b1255f5a22 100644
--- a/drivers/staging/erofs/unzip_vle.c
+++ b/drivers/staging/erofs/unzip_vle.c
@@ -702,7 +702,8 @@ static int z_erofs_do_read_page(struct z_erofs_vle_frontend *fe,
/* can be used for verification */
map->m_llen = offset + cur - map->m_la;
- if ((end = cur) > 0)
+ end = cur;
+ if (end > 0)
goto repeat;
/* FIXME! avoid the last relundant fixup & endio */
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)
--
2.18.0
next reply other threads:[~2018-08-05 15:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-05 15:21 Kristaps Čivkulis [this message]
2018-08-05 16:05 ` Gao Xiang
2018-08-06 1:43 ` Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180805152101.11657-1-kristaps.civkulis@gmail.com \
--to=kristaps.civkulis@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gaoxiang25@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®