diff mbox series

mm/hotplug: remove unneeded return for void function

Message ID 20190723130814.21826-1-houweitaoo@gmail.com (mailing list archive)
State New, archived
Headers show
Series mm/hotplug: remove unneeded return for void function | expand

Commit Message

Weitao Hou July 23, 2019, 1:08 p.m. UTC
return is unneeded in void function

Signed-off-by: Weitao Hou <houweitaoo@gmail.com>
---
 mm/memory_hotplug.c | 2 --
 1 file changed, 2 deletions(-)

Comments

David Hildenbrand July 23, 2019, 1:13 p.m. UTC | #1
On 23.07.19 15:08, Weitao Hou wrote:
> return is unneeded in void function
> 
> Signed-off-by: Weitao Hou <houweitaoo@gmail.com>
> ---
>  mm/memory_hotplug.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 2a9bbddb0e55..c73f09913165 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -132,7 +132,6 @@ static void release_memory_resource(struct resource *res)
>  		return;
>  	release_resource(res);
>  	kfree(res);
> -	return;
>  }
>  
>  #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
> @@ -979,7 +978,6 @@ static void rollback_node_hotadd(int nid)
>  	arch_refresh_nodedata(nid, NULL);
>  	free_percpu(pgdat->per_cpu_nodestats);
>  	arch_free_nodedata(pgdat);
> -	return;
>  }
>  
>  
> 

Reviewed-by: David Hildenbrand <david@redhat.com>
Oscar Salvador July 23, 2019, 1:14 p.m. UTC | #2
On Tue, Jul 23, 2019 at 09:08:14PM +0800, Weitao Hou wrote:
> return is unneeded in void function
> 
> Signed-off-by: Weitao Hou <houweitaoo@gmail.com>

Reviewed-by: Oscar Salvador <osalvador@suse.de>

> ---
>  mm/memory_hotplug.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 2a9bbddb0e55..c73f09913165 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -132,7 +132,6 @@ static void release_memory_resource(struct resource *res)
>  		return;
>  	release_resource(res);
>  	kfree(res);
> -	return;
>  }
>  
>  #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
> @@ -979,7 +978,6 @@ static void rollback_node_hotadd(int nid)
>  	arch_refresh_nodedata(nid, NULL);
>  	free_percpu(pgdat->per_cpu_nodestats);
>  	arch_free_nodedata(pgdat);
> -	return;
>  }
>  
>  
> -- 
> 2.18.0
>
diff mbox series

Patch

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 2a9bbddb0e55..c73f09913165 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -132,7 +132,6 @@  static void release_memory_resource(struct resource *res)
 		return;
 	release_resource(res);
 	kfree(res);
-	return;
 }
 
 #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
@@ -979,7 +978,6 @@  static void rollback_node_hotadd(int nid)
 	arch_refresh_nodedata(nid, NULL);
 	free_percpu(pgdat->per_cpu_nodestats);
 	arch_free_nodedata(pgdat);
-	return;
 }