[U-Boot] [PATCH v2] net: eth_common: Don't use %pM when USE_TINY_PRINTF is enabled

Wolfgang Denk wd at denx.de
Mon Apr 3 20:08:51 UTC 2017


Dear Vignesh,

In message <2c453144-8aba-3e66-8f1f-fe468bcdc382 at ti.com> you wrote:
> 
> I agree, networking widely uses %pM for printing mac addresses.
> Are you suggesting to port %pM support from lib/vsprintf.c to
> lib/tiny-printf.c and make it available based on CONFIG_CMD_NET?

I don't think we should add another #ifdef for this.  How much (in
terms of number of bytes) does it hurt to add it without an #ifdef?

I guess we cannot handle this in some intelligent automatic way
similar to dead code elimination?

> I am trying to use RNDIS boot on am437x/am335x boards with
> CONFIG_USE_TINY_PRINTF(to reduce code size due to internal SRAM size
> constraint) and therefore need networking support in SPL.

So you need networking _and_ USB and still care about the printf()
size?  Ouch...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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
"Plan to throw one away.  You will anyway."
                              - Fred Brooks, "The Mythical Man Month"


More information about the U-Boot mailing list