[PATCH 04/10] staging: most: remove constants from comparisons

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch removes constants from comparisons and fixes checkpatch warnings
about constants being put in the wrong place inside a comparison.

Signed-off-by: Christian Gromm <christian.gromm@xxxxxxxxxxxxx>
---
 drivers/staging/most/aim-cdev/cdev.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c
index 16be88e..93b07661 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -134,7 +134,7 @@ static int aim_close(struct inode *inode, struct file *filp)
 	}
 	mutex_unlock(&channel->io_mutex);
 
-	while (0 != kfifo_out((struct kfifo *)&channel->fifo, &mbo, 1))
+	while (kfifo_out((struct kfifo *)&channel->fifo, &mbo, 1))
 		most_put_mbo(mbo);
 	if (channel->keep_mbo)
 		most_put_mbo(channel->stacked_mbo);
@@ -233,7 +233,7 @@ aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset)
 		channel->keep_mbo = false;
 		goto start_copy;
 	}
-	while ((0 == kfifo_out(&channel->fifo, &mbo, 1))
+	while ((!kfifo_out(&channel->fifo, &mbo, 1))
 	       && (channel->dev)) {
 		if (filp->f_flags & O_NONBLOCK)
 			return -EAGAIN;
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux