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

Graeme Russ graeme.russ at gmail.com
Wed Sep 19 01:44:57 CEST 2012


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 :)

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

Regards,

Graeme


More information about the U-Boot mailing list