[U-Boot] [PATCH] m68k: fix ambiguous bit testing

Mike Frysinger vapier at gentoo.org
Sat Oct 15 22:10:42 CEST 2011


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 '~'

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 arch/m68k/cpu/mcf52x2/cpu_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/m68k/cpu/mcf52x2/cpu_init.c b/arch/m68k/cpu/mcf52x2/cpu_init.c
index 170bbfc..a98a926 100644
--- a/arch/m68k/cpu/mcf52x2/cpu_init.c
+++ b/arch/m68k/cpu/mcf52x2/cpu_init.c
@@ -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)) ;
 }
 
 /*
-- 
1.7.6.1



More information about the U-Boot mailing list