42 lines
1.1 KiB
Diff
42 lines
1.1 KiB
Diff
From 344883869c1e7e7dd873e920a709950ce0546140 Mon Sep 17 00:00:00 2001
|
|
From: Bernhard Walle <bwalle@suse.de>
|
|
Date: Thu, 9 Oct 2008 18:58:12 +0200
|
|
Subject: [PATCH] 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.
|
|
|
|
|
|
Signed-off-by: Bernhard Walle <bwalle@suse.de>
|
|
|
|
---
|
|
kexec/arch/ppc64/kexec-ppc64.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
--- a/kexec/arch/ppc64/kexec-ppc64.c
|
|
+++ b/kexec/arch/ppc64/kexec-ppc64.c
|
|
@@ -137,6 +137,8 @@ static int count_dyn_reconf_memory_range
|
|
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;
|
|
}
|
|
|