Skip to contentSkip to conversation

m68k: fix ambiguous bit testing

PATCH New Mike Frysinger 2 participants 2 messages Oct 15, 2011 – Dec 1, 2011 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k: fix ambiguous bit testing

Building for some m68k boards results in the warning:

cpu_init.c: In function 'cpu_init_f':
cpu_init.c:287: warning: suggest parentheses around

	operand of '!' or change '&' to '&&' or '!' to '~'
---
 arch/m68k/cpu/mcf52x2/cpu_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/m68k/cpu/mcf52x2/cpu_init.c +1 -1
index 170bbfc..a98a926 100644
@@ -284,7 +284,7 @@ void cpu_init_f(void)
 	mbar_writeLong(MCF_FMPLL_SYNCR,
 			MCF_FMPLL_SYNCR_MFD(0) | MCF_FMPLL_SYNCR_RFD(0));
 #endif
-	while (!mbar_readByte(MCF_FMPLL_SYNSR) & MCF_FMPLL_SYNSR_LOCK) ;
+	while (!(mbar_readByte(MCF_FMPLL_SYNSR) & MCF_FMPLL_SYNSR_LOCK)) ;
 }
 
 /*
Signature · 1 line
1.7.6.1
#1 lore raw

PATCH 1/1 m68k: fix ambiguous bit testing

Quoted 10 lines · On Sat, 15 Oct 2011 16:10:42 -0400 Mike Frysinger <[email protected]> wrote:

Building for some m68k boards results in the warning:

cpu_init.c: In function 'cpu_init_f':
cpu_init.c:287: warning: suggest parentheses around

	operand of '!' or change '&' to '&&' or '!' to '~'
---
 arch/m68k/cpu/mcf52x2/cpu_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied to u-boot-staging/agust at denx.de. Thanks!

Anatolij