Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1269418 > unrolled thread
| Started by | Anjali Menon <cse.anjalimenon@gmail.com> |
|---|---|
| First post | 2015-11-14 05:30 +0100 |
| Last post | 2015-11-14 08:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] staging: most: aim-cdev: Used "==" instead of assignment Anjali Menon <cse.anjalimenon@gmail.com> - 2015-11-14 05:30 +0100
Re: [PATCH] staging: most: aim-cdev: Used "==" instead of assignment Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-11-14 08:10 +0100
| From | Anjali Menon <cse.anjalimenon@gmail.com> |
|---|---|
| Date | 2015-11-14 05:30 +0100 |
| Subject | [PATCH] staging: most: aim-cdev: Used "==" instead of assignment |
| Message-ID | <quADn-7Dz-1@gated-at.bofh.it> |
Used double equal sign instead of equal to sign in the if condition to remove the error detected by checkpatch.pl. ERROR: do not use assignment in if condition Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com> --- drivers/staging/staging/drivers/staging/most/aim-cdev/cdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/staging/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/staging/drivers/staging/most/aim-cdev/cdev.c index dc3fb25..da1f894 100644 --- a/drivers/staging/staging/drivers/staging/most/aim-cdev/cdev.c +++ b/drivers/staging/staging/drivers/staging/most/aim-cdev/cdev.c @@ -175,7 +175,7 @@ static ssize_t aim_write(struct file *filp, const char __user *buf, return -EAGAIN; if (wait_event_interruptible( channel->wq, - (mbo = most_get_mbo(channel->iface, + (mbo == most_get_mbo(channel->iface, channel->channel_id, &cdev_aim)) || (!channel->dev))) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-11-14 08:10 +0100 |
| Message-ID | <quD8e-Wt-9@gated-at.bofh.it> |
| In reply to | #1269418 |
On Sat, Nov 14, 2015 at 09:57:10AM +0530, Anjali Menon wrote: > Used double equal sign instead of equal to sign in the if condition > to remove the error detected by checkpatch.pl. > > ERROR: do not use assignment in if condition > > Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com> > --- > drivers/staging/staging/drivers/staging/most/aim-cdev/cdev.c | 2 +- something wrong with your tree. This path doesnot exist. But in any case, i think the patch is wrong. wait_event_interruptible() is executed when most_get_mbo() returns NULL. so if you do mbo == most_get_mbo() it will immediately come out of sleep as the condition is true. I think here the intention was to sleep as long as most_get_mbo() returns NULL. And when it returns a valid pointer it is saved in mbo variable so that it can be used later in copy_from_user(). regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web