[PATCH] ATM: misplaced parentheses?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Roel Kluin
Date: Sunday, February 15, 2009 - 9:07 am

I think below is what was intended? otherwise we could as well have written:

tmp = (lanai->conf1 & ~CONFIG1_PROMDATA) ||
	(data & i) ? CONFIG1_PROMDATA : 0;

Does this fix the parsing of the EEPROM?

please review.
-------------------------->8------------------8<---------------------------
Fix misplaced parentheses

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index 144a49f..317fb5a 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -901,7 +901,7 @@ static int __devinit eeprom_read(struct lanai_dev *lanai)
 		clock_l(); udelay(5);
 		for (i = 128; i != 0; i >>= 1) {   /* write command out */
 			tmp = (lanai->conf1 & ~CONFIG1_PROMDATA) |
-			    (data & i) ? CONFIG1_PROMDATA : 0;
+			    (data & i ? CONFIG1_PROMDATA : 0);
 			if (lanai->conf1 != tmp) {
 				set_config1(tmp);
 				udelay(5);	/* Let new data settle */
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] ATM: misplaced parentheses?, Roel Kluin, (Sun Feb 15, 9:07 am)
Re: [PATCH] ATM: misplaced parentheses?, Chas Williams (CONTR ..., (Mon Feb 16, 3:02 pm)
Re: [PATCH] ATM: misplaced parentheses?, Al Viro, (Mon Feb 16, 3:30 pm)
Re: [PATCH] ATM: misplaced parentheses?, Roel Kluin, (Tue Feb 17, 2:59 am)
Re: [PATCH] ATM: misplaced parentheses?, David Miller, (Wed Feb 18, 6:41 pm)