Re: [PATCH v3 2/2] mm, sparse: pass nid instead of pgdat to sparse_add_one_section()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30.11.18 02:22, Wei Yang wrote:
> On Thu, Nov 29, 2018 at 05:01:51PM +0100, David Hildenbrand wrote:
>> On 29.11.18 16:53, Wei Yang wrote:
>>> Since the information needed in sparse_add_one_section() is node id to
>>> allocate proper memory, it is not necessary to pass its pgdat.
>>>
>>> This patch changes the prototype of sparse_add_one_section() to pass
>>> node id directly. This is intended to reduce misleading that
>>> sparse_add_one_section() would touch pgdat.
>>>
>>> Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx>
>>> ---
>>>  include/linux/memory_hotplug.h | 2 +-
>>>  mm/memory_hotplug.c            | 2 +-
>>>  mm/sparse.c                    | 6 +++---
>>>  3 files changed, 5 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
>>> index 45a5affcab8a..3787d4e913e6 100644
>>> --- a/include/linux/memory_hotplug.h
>>> +++ b/include/linux/memory_hotplug.h
>>> @@ -333,7 +333,7 @@ extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn,
>>>  		unsigned long nr_pages, struct vmem_altmap *altmap);
>>>  extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages);
>>>  extern bool is_memblock_offlined(struct memory_block *mem);
>>> -extern int sparse_add_one_section(struct pglist_data *pgdat,
>>> +extern int sparse_add_one_section(int nid,
>>>  		unsigned long start_pfn, struct vmem_altmap *altmap);
>>
>> While you touch that, can you fixup the alignment of the other parameters?
>>
> 
> If I am correct, the code style of alignment is like this?
> 
> extern int sparse_add_one_section(int nid, unsigned long start_pfn,
> 				  struct vmem_altmap *altmap);

Yes, all parameters should start at the same indentation. (some people
don't care and produce this "mess", I tend to care :) )

> 
>> Apart from that
>>
>> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>
>>
> 


-- 

Thanks,

David / dhildenb




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux