From: Tom Rini Date: Sat, 14 Sep 2019 14:29:11 -0400 Subject: [U-Boot] [PATCH] net: Always build the string_to_enetaddr() helper In-Reply-To: <20190914140544.t73l3iw4tvuznhkq@core.my.home> References: <20190914004022.58537-1-joe.hershberger@ni.com> <20190914140544.t73l3iw4tvuznhkq@core.my.home> Message-ID: <20190914182911.GT6927@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de On Sat, Sep 14, 2019 at 04:05:44PM +0200, Ond=C5=99ej Jirman wrote: > Hi, >=20 > On Fri, Sep 13, 2019 at 07:40:22PM -0500, Joe Hershberger wrote: > > Part of the env cleanup moved this out of the environment code and into > > the net code. However, this helper is sometimes needed even when the net > > stack isn't included. > >=20 > > Move the helper to lib/net_utils.c like it's similarly-purposed > > string_to_ip(). Also rename the moved function to similar naming. > >=20 > > Signed-off-by: Joe Hershberger > > Reported-by: Ondrej Jirman >=20 > I've tested the patch and it works, but I'be found other related issue, w= here > u-boot thinks %pM will format a MAC address string, but it does just > print out the pointer due to relevant functions being gated by CONFIG_CMD= _NET > guard in lib/vsprintf.c. >=20 > The gating should probably be done so that it panics/halts the u-boot if = gated > pointer flags are used by u-boot code, because that will clearly be incor= rect, > without calling code ever knowing. This way the user will know that somet= hing > is wrong and will have to fix the code. I'm not in favor of panic because of calling an unimplemented print format character. I guess we'll need to see what the size increase is on un-guarding these formats and go from there. --=20 Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: