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

login
register
mail settings
Submitter Mike Frysinger
Date Oct. 15, 2011, 8:10 p.m.
Message ID <1318709442-26266-1-git-send-email-vapier@gentoo.org>
Download mbox | patch
Permalink /patch/119994/
State Accepted
Commit 65f0d12152cd9930acbefbd79e403e1688522901
Delegated to: Anatolij Gustschin
Headers show

Comments

Mike Frysinger - Oct. 15, 2011, 8:10 p.m.
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@gentoo.org>
---
 arch/m68k/cpu/mcf52x2/cpu_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Anatolij Gustschin - Dec. 1, 2011, 9:27 p.m.
On Sat, 15 Oct 2011 16:10:42 -0400
Mike Frysinger <vapier@gentoo.org> 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 '~'
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  arch/m68k/cpu/mcf52x2/cpu_init.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

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

Anatolij

Patch

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)) ;
 }
 
 /*