Re: [PATCH 3/6] mm: remove return value from init_currently_empty_zone

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

 



On March 30, 2017 7:55 PM Michal Hocko wrote: 
> 
> From: Michal Hocko <mhocko@xxxxxxxx>
> 
> init_currently_empty_zone doesn't have any error to return yet it is
> still an int and callers try to be defensive and try to handle potential
> error. Remove this nonsense and simplify all callers.
> 
It is already cut off in 1/6 in this series?

<snip>

> -/* Can fail with -ENOMEM from allocating a wait table with vmalloc() or
> - * alloc_bootmem_node_nopanic()/memblock_virt_alloc_node_nopanic() */
> -static int __ref ensure_zone_is_initialized(struct zone *zone,
> +static void __ref ensure_zone_is_initialized(struct zone *zone,
>  			unsigned long start_pfn, unsigned long num_pages)
>  {
> -	if (zone_is_empty(zone))
> -		return init_currently_empty_zone(zone, start_pfn, num_pages);
> -
> -	return 0;
> +	if (!zone_is_empty(zone))
> +		init_currently_empty_zone(zone, start_pfn, num_pages);
>  }
Semantic change added?

Hillf

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[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