public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL PATCH] mm/sparse: Remove unused ret in sparse_index_init
@ 2013-05-17 14:10 Zhang Yanfei
  0 siblings, 0 replies; only message in thread
From: Zhang Yanfei @ 2013-05-17 14:10 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-kernel@vger.kernel.org

From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>

The ret variable is not used in the function, so remove it and
directly return 0 at the end of the function.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
---
 mm/sparse.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/mm/sparse.c b/mm/sparse.c
index 1c91f0d..9ac2f74 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -79,7 +79,6 @@ static int __meminit sparse_index_init(unsigned long section_nr, int nid)
 {
 	unsigned long root = SECTION_NR_TO_ROOT(section_nr);
 	struct mem_section *section;
-	int ret = 0;
 
 	if (mem_section[root])
 		return -EEXIST;
@@ -90,7 +89,7 @@ static int __meminit sparse_index_init(unsigned long section_nr, int nid)
 
 	mem_section[root] = section;
 
-	return ret;
+	return 0;
 }
 #else /* !SPARSEMEM_EXTREME */
 static inline int sparse_index_init(unsigned long section_nr, int nid)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-17 14:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-17 14:10 [TRIVIAL PATCH] mm/sparse: Remove unused ret in sparse_index_init Zhang Yanfei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox