From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH 2/9] staging: most: bool comparison style
Date: Tue, 18 Aug 2015 20:48:21 +0530 [thread overview]
Message-ID: <1439911108-20765-2-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1439911108-20765-1-git-send-email-sudipm.mukherjee@gmail.com>
Mentioning true or false in the if comparison is error prone and also
not according to the coding style.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/most/aim-cdev/cdev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c
index 7b637f3..e5853d0 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -133,7 +133,7 @@ static int aim_close(struct inode *inode, struct file *filp)
while (0 != kfifo_out((struct kfifo *)&channel->fifo, &mbo, 1))
most_put_mbo(mbo);
- if (channel->keep_mbo == true)
+ if (channel->keep_mbo)
most_put_mbo(channel->stacked_mbo);
ret = most_stop_channel(channel->iface, channel->channel_id);
atomic_dec(&channel->access_ref);
@@ -224,7 +224,7 @@ aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset)
struct mbo *mbo;
struct aim_channel *channel = filp->private_data;
- if (channel->keep_mbo == true) {
+ if (channel->keep_mbo) {
mbo = channel->stacked_mbo;
channel->keep_mbo = false;
goto start_copy;
@@ -259,7 +259,7 @@ start_copy:
retval = not_copied ? proc_len - not_copied : proc_len;
- if (channel->keep_mbo == true) {
+ if (channel->keep_mbo) {
channel->mbo_offs = retval;
channel->stacked_mbo = mbo;
} else {
--
1.9.1
next prev parent reply other threads:[~2015-08-18 15:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 15:18 [PATCH 1/9] staging: most: NULL " Sudip Mukherjee
2015-08-18 15:18 ` Sudip Mukherjee [this message]
2015-08-18 15:18 ` [PATCH 3/9] staging: most: remove multiple blank line Sudip Mukherjee
2015-08-18 15:18 ` [PATCH 4/9] staging: most: out of memory error Sudip Mukherjee
2015-08-18 15:18 ` [PATCH 5/9] staging: most: remove unused functions Sudip Mukherjee
2015-08-18 15:18 ` [PATCH 6/9] staging: most: make functions static Sudip Mukherjee
2015-08-18 15:18 ` [PATCH 7/9] staging: most: use NULL pointer Sudip Mukherjee
2015-08-18 15:18 ` [PATCH 8/9] staging: most: remove unused variable Sudip Mukherjee
2015-08-18 15:18 ` [PATCH 9/9] staging: most: fix Makefile Sudip Mukherjee
2015-08-18 16:31 ` [PATCH 1/9] staging: most: NULL comparison style Fabio Estevam
2015-08-19 10:00 ` Sudip Mukherjee
2015-08-19 14:51 ` Frans Klaver
2015-08-24 13:49 ` [PATCH v2] " Sudip Mukherjee
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=1439911108-20765-2-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@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
all inboxes | Powered by JetHome®