lkml.org 
[lkml]   [2010]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/16] x86, memblock: Add get_free_all_memory_range()
On 07/27/2010 10:02 PM, Benjamin Herrenschmidt wrote:
> On Thu, 2010-07-22 at 11:43 -0700, Yinghai Lu wrote:
>>
>> + /* Take out region array itself at first*/
>> + if (memblock.reserved.regions != memblock_reserved_init_regions)
>> + memblock_free(__pa(memblock.reserved.regions), sizeof(struct memblock_region) * memblock.reserved.max);
>> +
>
> More of that horror. Don't.
>
> Another option from what i proposed earlier is to actually have a function
> inside mm/memblock to free it (memblock_free_arrays()) that does nothing
> if memblock is to survive init.
>
> I hate exporting variables or data structures like that. Functions are
> semantically a lot cleaner.

ok, will check if can change that to function instead.
but it will be with add-on patch.

Thanks

Yinghai


\
 
 \ /
  Last update: 2010-07-28 07:45    [W:0.170 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site