Re: [PATCH] mm/memory_hotplug: use __pfn_to_section() instead of open-coding

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

 



On 16.03.20 08:52, qiwuchen55@xxxxxxxxx wrote:
> From: chenqiwu <chenqiwu@xxxxxxxxxx>
> 
> Use __pfn_to_section() API instead of open-coding or better

s/or/for/

> code readability.
> 
> Signed-off-by: chenqiwu <chenqiwu@xxxxxxxxxx>
> ---
>  mm/memory_hotplug.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 19389cd..62e9c66 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -494,7 +494,7 @@ static void __remove_section(unsigned long pfn, unsigned long nr_pages,
>  			     unsigned long map_offset,
>  			     struct vmem_altmap *altmap)
>  {
> -	struct mem_section *ms = __nr_to_section(pfn_to_section_nr(pfn));
> +	struct mem_section *ms = __pfn_to_section(pfn);
>  
>  	if (WARN_ON_ONCE(!valid_section(ms)))
>  		return;
> 

Acked-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