[U-Boot] [POWERPC] mgsuvd: fix codingstyle

Wolfgang Denk wd at denx.de
Fri Oct 17 12:22:18 CEST 2008


Dear Heiko Schocher,

In message <48F865A9.1020501 at denx.de> you wrote:
> 
> Signed-off-by: Heiko Schocher <hs at denx.de>
> ---
>  board/keymile/mgsuvd/mgsuvd.c |   67 +++++++++++++++++-----------------------
>  include/configs/mgsuvd.h      |   10 ++----
>  2 files changed, 33 insertions(+), 44 deletions(-)

Applied to "next" branch.

Note 1: Heiko, it's "coding style" or "Coding Style", but not
	"codingstyle"

Note 2:

> +	nodeoffset = fdt_path_offset (blob, "/memory");
> +	if (nodeoffset >= 0) {
> +		ret = fdt_setprop (blob, nodeoffset, "reg", memory_data,
> +					sizeof (memory_data));
>  		if (ret < 0)
>  			printf("ft_blob_update(): cannot set /memory/reg "
> -				"property err:%s\n", fdt_strerror(ret));
> -		}
> -		else {
> +				"property err:%s\n", fdt_strerror (ret));
> +		} else {
>  			/* memory node is required in dts */
>  			printf("ft_blob_update(): cannot find /memory node "
> -			"err:%s\n", fdt_strerror(nodeoffset));
> +				"err:%s\n", fdt_strerror (nodeoffset));

You really want to turn the 4 repetitions of the very same code  into
a function.

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 borrow money from a pessimist; they don't expect  to  be  paid
back.


More information about the U-Boot mailing list