[coreboot] [PATCH] reduce the size of devices
Myles Watson
mylesgw at gmail.com
Fri May 21 16:43:00 CEST 2010
On Fri, May 21, 2010 at 8:03 AM, Patrick Georgi <patrick at georgi-clan.de> wrote:
> Am 21.05.2010 01:08, schrieb Myles Watson:
>> static void free_resource(device_t dev, struct resource *res, struct
> resource *prev)
>> ...
>> + res->next = free_resources;
>> + free_resources = res->next;
>
> Shouldn't that be
> + res->next = free_resources;
> + free_resources = res;
> to add res to the free_resources?
Yes. Thanks for catching it. It's too bad to leak the memory you're
saving :) Fixed.
> Other than that, this is great! Smaller, cleaner, faster code, that uses
> less memory to achieve the same result - wonderful!
Thanks. If we do the same thing with links we could save another ~150
bytes per device. There are 8 links per device when few of them have
any at all.
> With the above thing cleared up, this is
> Acked-by: Patrick Georgi <patrick.georgi at coresystems.de>
Rev 5576.
Thanks,
Myles
More information about the coreboot
mailing list