Skip to contentSkip to conversation

mm/hotplug: remove unneeded return for void function

PATCH In review Weitao Hou 3 participants 3 messages Jul 23, 2019

Subsystems (2)
lore
Share & tools
lore

Weitao Hou

author
#0 lore raw

PATCH 1/1 mm/hotplug: remove unneeded return for void function

return is unneeded in void function

---
 mm/memory_hotplug.c | 2 --
 1 file changed, 2 deletions(-)
mm/memory_hotplug.c +0 -2
index 2a9bbddb0e55..c73f09913165 100644
@@ -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;
 }
 
 
Signature · 1 line
2.18.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 21 lines · Weitao Hou

return is unneeded in void function

---
 mm/memory_hotplug.c | 2 --
 1 file changed, 2 deletions(-)
mm/memory_hotplug.c +0 -1
index 2a9bbddb0e55..c73f09913165 100644
@@ -132,7 +132,6 @@ static void release_memory_resource(struct resource *res)
 		return;
 	release_resource(res);
 	kfree(res);
-	return;
 }
 
 #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE

mm/memory_hotplug.c static void rollback_node_hotadd(int nid) · line 983

Quoted 7 lines
mm/memory_hotplug.c +0 -1
@@ -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;
 }
 
 
Signature · 3 lines
Thanks,

David / dhildenb
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Weitao Hou
Quoted 3 lines · Weitao Hou

return is unneeded in void function

Quoted 27 lines
---
 mm/memory_hotplug.c | 2 --
 1 file changed, 2 deletions(-)
mm/memory_hotplug.c +0 -2
index 2a9bbddb0e55..c73f09913165 100644
@@ -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;
 }
 
 
Signature · 1 line
2.18.0
Signature · 2 lines
Oscar Salvador
SUSE L3