[U-Boot] [PATCH] [v4] powerpc/85xx: fix compatible property for the L2 cache node

Wolfgang Denk wd at denx.de
Sat Apr 30 00:51:32 CEST 2011


Dear Tabi Timur-B04825,

In message <4DBB3E01.7000704 at freescale.com> you wrote:
> Wolfgang Denk wrote:
> > Why do we need this "if" at all? tolower() on a digit is a nop, so you
> > can omit the first branch.
> 
> Because cpu->name looks like one of two ways:
> 
> 	8578
> 
> or
> 	
> 	P4080
> 
> In the case of "8578", we want to convert that to "mpc8578".  In the case o
> f "P4080", we want to convert that to "p4080".
> 
> The "if" is need to determine whether to prepend the "mpc".

This gets lost in the code.

If you keep the if / else, you have to add braces for the multiline
statements.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Always try to do things in chronological order; it's  less  confusing
that way.


More information about the U-Boot mailing list