From: Guilherme Tadashi Maeoka <gui.maeoka@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Guilherme Tadashi Maeoka <gui.maeoka@gmail.com>
Subject: [PATCH 5/5] Staging: rtl8723bs: os_dep: Set constant on right side
Date: Sat, 9 Mar 2019 15:30:47 -0300 [thread overview]
Message-ID: <20190309183047.10781-6-gui.maeoka@gmail.com> (raw)
In-Reply-To: <20190309183047.10781-1-gui.maeoka@gmail.com>
Place a constant on the right side of the test.
Signed-off-by: Guilherme Tadashi Maeoka <gui.maeoka@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/osdep_service.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
index 262b70e88e67..2ad28d903ef8 100644
--- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
@@ -109,7 +109,7 @@ static int readFile(struct file *fp, char *buf, int len)
rlen = fp->f_op->read(fp, (char __force __user *)buf+sum, len-sum, &fp->f_pos);
if (rlen > 0)
sum += rlen;
- else if (0 != rlen)
+ else if (rlen != 0)
return rlen;
else
break;
@@ -137,7 +137,7 @@ static int isFileReadable(char *path)
} else {
oldfs = get_fs(); set_fs(KERNEL_DS);
- if (1 != readFile(fp, &buf, 1))
+ if (readFile(fp, &buf, 1) != 1)
ret = -EINVAL;
set_fs(oldfs);
--
2.17.1
next prev parent reply other threads:[~2019-03-09 18:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-09 18:30 [PATCH 0/5] Fix several coding style errors Guilherme Tadashi Maeoka
2019-03-09 18:30 ` [PATCH 1/5] Staging: rtl8723bs: os_dep: Fix assignment in if condition Guilherme Tadashi Maeoka
2019-03-09 18:39 ` Joe Perches
2019-03-09 19:00 ` Guilherme T Maeoka
2019-03-17 11:39 ` Greg KH
2019-03-09 18:30 ` [PATCH 2/5] Staging: rtl8723bs: os_dep: Fix space required coding style Guilherme Tadashi Maeoka
2019-03-09 18:30 ` [PATCH 3/5] Staging: rtl8723bs: os_dep: Fix else to follow close brace Guilherme Tadashi Maeoka
2019-03-09 18:30 ` [PATCH 4/5] Staging: rtl8723bs: os_dep: Fix space in pointer definition Guilherme Tadashi Maeoka
2019-03-09 18:30 ` Guilherme Tadashi Maeoka [this message]
2019-03-17 11:07 ` [PATCH 0/5] Fix several coding style errors Greg KH
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=20190309183047.10781-6-gui.maeoka@gmail.com \
--to=gui.maeoka@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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