[U-Boot] [PATCHv4] [RFC] DM: early_malloc for DM added.

Marek Vasut marex at denx.de
Wed Sep 19 01:53:54 CEST 2012


Dear Graeme Russ,

> Hi Marek,
> 
> On Wed, Sep 19, 2012 at 9:33 AM, Marek Vasut <marex at denx.de> wrote:
> > Dear Graeme Russ,
> 
> [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 ;))
> > 
> > The former looks like shit and the later is more linux-friendly. I'd say
> > stick with the later to avoid this insane __attribute__(()) construct.
> 
> I agree, but, consistently bad is worse than inconsistently bad :)

To weed out the old crap, we need linux/compiler.h enabled across whole uboot 
... it's in the todo.

> I'm look forward to reviewing a cleanup patch ;)

Wait until I get it completely built. linux/compiler.h causes breakage on some 
ancient PPC crap.

> Regards,
> 
> Graeme

Best regards,
Marek Vasut


More information about the U-Boot mailing list