[U-Boot] [PATCH v2 4/8] km/common: implement boardId HWkey checks as u-boot cmd

Wolfgang Denk wd at denx.de
Thu May 5 20:29:56 CEST 2011


Dear Holger Brunck,

In message <4DC2AB4A.608 at keymile.com> you wrote:
> 
> > This patch has checkpatch warnings.  Please fix.
> 
> Ok the one warning that we exceed 80 characters per line is fixed, sorry for
> that. But there are two warnings remaining:
> WARNING: consider using strict_strtoul in preference to simple_strtoul
> #137: FILE: board/keymile/common/common.c:813:
> +				bid = simple_strtoul(rest, &endp, 16);
> 
> WARNING: consider using strict_strtoul in preference to simple_strtoul
> #141: FILE: board/keymile/common/common.c:817:
> +					hwkey = simple_strtoul(rest, &endp, 16);
> 
> I know that we use strict_strtoul in the same patch some lines above, but at
> this point we need *endp and we know that we got a non numeric character at the
> end. So using simple_strtoul at this point is exactly what we want here.

Well, mixing both strict_strtoul() and simple_strtoul() [without any
comment] in the same patch was what attracted my attention in the
first place.

> Is it ok to ignore this warnings and add a comment above the codeline why we use
> simple_stroul?

Indeed this needs a comment.


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
f u cn rd ths, itn tyg h myxbl cd.


More information about the U-Boot mailing list