From: Wolfgang Denk Date: Thu, 05 May 2011 20:29:56 +0200 Subject: [U-Boot] [PATCH v2 4/8] km/common: implement boardId HWkey checks as u-boot cmd In-Reply-To: <4DC2AB4A.608@keymile.com> References: <02d1e3f265123ff0296b1c38b227f6d30393ee77.1304508448.git.holger.brunck@keymile.com> <20110504221141.299D2126DAA@gemini.denx.de> <4DC2AB4A.608@keymile.com> Message-ID: <20110505182956.F39DAD60EB7@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Holger Brunck, In message <4DC2AB4A.608@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.