[PATCH 2/2] i2c-nomadik: fix operator precedence warning

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

 



Fix this warning:
i2c-nomadik.c:707: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'

Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>
Acked-by: Srinidhi Kasagar <srinidhi.kasagar@xxxxxxxxxxxxxx>
Signed-off-by: Rabin Vincent <rabin.vincent@xxxxxxxxxxxxxx>
---
 drivers/i2c/busses/i2c-nomadik.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index 170dbd7..73de8ad 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -704,7 +704,8 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)
 	case I2C_IT_MTD:
 	case I2C_IT_MTDWS:
 		if (dev->cli.operation == I2C_READ) {
-			while (!readl(dev->virtbase + I2C_RISR) & I2C_IT_RXFE) {
+			while (!(readl(dev->virtbase + I2C_RISR)
+				 & I2C_IT_RXFE)) {
 				if (dev->cli.count == 0)
 					break;
 				*dev->cli.buffer =
-- 
1.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux