On Wed, Sep 19, 2012 at 09:29:04AM +1000, Graeme Russ wrote: > Hi Marek, > > On Tue, Sep 18, 2012 at 8:57 PM, Marek Vasut <ma...@denx.de> wrote: > > Dear Tomas Hlavacek, [snip] > >> +struct early_heap_header *early_brk(size_t size) > >> + __attribute__((weak, alias("def_early_brk"))); > > > > what about using (it needs <linux/compiler.h>): > > > > __weak struct early_heap_header *early_brk(size_t size) > > { > > ... > > body > > ... > > } > > We already have a lot of the former - I prefer not to add additional > semantics (unless you want to do a wholesale search/replace ;))
Migrating everyone but the real tricky uses (alias >=2 functions to one weak dummy) to the <linux/compiler.h> semantics is something on my TODO list from ages ago. So yes please, unless it's a complex case, find and use the __shortform that <linux/compiler.h> and company provide (and a git grep for your attribute when in doubt, sometimes it's in <linux/compiler-gcc.h or so). And a general I know everyone should know but please, checkpatch.pl your work before posting. Getting everyone doing DM series patches to use patman might be a little bit more overhead (sorry!) but it'll help with a lot of the little things like formatting and some of the bigger things like changelog tracking. Don't have to switch but it might make your lives easier. -- Tom _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot