[U-Boot] [PATCH V3 05/13] i2c: Create common default i2c_set_bus_num() function

Mike Frysinger vapier at gentoo.org
Tue Oct 11 19:46:09 CEST 2011


On Tuesday 11 October 2011 13:30:24 Stefano Babic wrote:
> On 10/10/2011 07:51 PM, Mike Frysinger wrote:
> >  i'm not sure which gets used more, or if
> > it's just a wash.  i think it makes sense to have an accessible default
> > func if it does something useful, but not if it's just a stub.
> > 
> > in the __def/weak style above, unless people use --gc-sections when
> > linking (i think we've got many people doing this now, but not all), you
> > end up with dead code in the binary.  in the code i proposed, the func
> > gets discarded both when using --gc-sections and when not.
> 
> You are right, but probably it makes no difference. I checked and it
> seems that only a few architectute (m68k, sparc and microblaze) do not
> set --gc-sections.

i would think the microblaze missing would be an oversight as it's "newer" 
code.  don't know (or honestly, care) how hard it would be to make m68k/sparc 
sane.  but it would be nice to get everyone using gc-sections as we could move 
that into common code and all new arches would start out sane ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111011/9ca332d2/attachment.pgp 


More information about the U-Boot mailing list