Skip to contentSkip to conversation

Use return value of count_dyn_reconf_memory_ranges()

PATCH In review Bernhard Walle 2 participants 2 messages Oct 9, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use return value of count_dyn_reconf_memory_ranges()

This patch fixes the build error

kexec/arch/ppc64/kexec-ppc64.c:140: \
warning: control reaches end of non-void function

The patch returns 0 on success, and checks when the function is called for a non-zero value.

---
 kexec/arch/ppc64/kexec-ppc64.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
kexec/arch/ppc64/kexec-ppc64.c +4 -1
index 40258b7..069a9fc 100644
@@ -137,6 +137,8 @@ static int count_dyn_reconf_memory_ranges(void)
 	num_of_lmbs = ((unsigned int *)buf)[0];
 	max_memory_ranges += num_of_lmbs;
 	fclose(file);
+
+	return 0;
 }
 
 /*
@@ -158,7 +160,8 @@ static int count_memory_ranges(void)
 	while ((dentry = readdir(dir)) != NULL) {
 		if (!strncmp(dentry->d_name,
 				"ibm,dynamic-reconfiguration-memory", 35)){
-			count_dyn_reconf_memory_ranges();
+			if (count_dyn_reconf_memory_ranges() != 0)
+				return -1;
 			continue;
 		}
 
Signature · 7 lines
1.6.0.2


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw
Quoted 7 lines · Bernhard Walle

This patch fixes the build error

kexec/arch/ppc64/kexec-ppc64.c:140: \
warning: control reaches end of non-void function

The patch returns 0 on success, and checks when the function is called for a non-zero value.

Thanks Bernhard, applied.

Signature · 9 lines
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec