Skip to contentSkip to conversation

lpc32xx/clock: Use && instead of &

PATCH New Wolfram Sang 3 participants 4 messages Aug 10, 2010 – Aug 20, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lpc32xx/clock: Use && instead of &

Because we are connecting two expressions here, not binary values.

---
 arch/arm/mach-lpc32xx/clock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-lpc32xx/clock.c +1 -1
index 32d6379..9ff1438 100644
@@ -397,7 +397,7 @@ static int local_usbpll_enable(struct clk *clk, int enable)
 		__raw_writel(reg, LPC32XX_CLKPWR_USB_CTRL);
 
 		/* Wait for PLL lock */
-		while ((timeout > jiffies) & (ret == -ENODEV)) {
+		while ((timeout > jiffies) && (ret == -ENODEV)) {
 			reg = __raw_readl(LPC32XX_CLKPWR_USB_CTRL);
 			if (reg & LPC32XX_CLKPWR_USBCTRL_PLL_STS)
 				ret = 0;
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 lpc32xx/clock: Use && instead of &

Hello.

Quoted 13 lines · Wolfram Sang

Because we are connecting two expressions here, not binary values.

---
 arch/arm/mach-lpc32xx/clock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-lpc32xx/clock.c +0 -0
index 32d6379..9ff1438 100644

arch/arm/mach-lpc32xx/clock.c static int local_usbpll_enable(struct clk *clk, int enable) · line 400

Quoted 5 lines
arch/arm/mach-lpc32xx/clock.c +1 -1
@@ -397,7 +397,7 @@ static int local_usbpll_enable(struct clk *clk, int enable)
 		__raw_writel(reg, LPC32XX_CLKPWR_USB_CTRL);
 
 		/* Wait for PLL lock */
-		while ((timeout > jiffies) & (ret == -ENODEV)) {
+		while ((timeout > jiffies) && (ret == -ENODEV)) {

Could also kill unnecessary parens, while at it...

WBR, Sergei

#3 lore raw

PATCH 1/1 lpc32xx/clock: Use && instead of &

Quoted 10 lines · Kevin Wells
Quoted 6 lines

Subject: [PATCH] lpc32xx/clock: Use && instead of &

Because we are connecting two expressions here, not binary values.

Do you want me to pull this patch into my next series?

Yes, I think this would be easiest.

Signature · 9 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100820/f5192be9/attachment-0001.sig>