[PATCH] kexec: cleanup: make add_backup_segments static

Zhang Yanfei zhangyanfei.yes at gmail.com
Sat Apr 27 02:35:11 EDT 2013


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

The function add_backup_segments is only called by my_load and
they are in the same file. So unnecessary to export it. Make it
static.

Signed-off-by: Zhang Yanfei <zhangyanfei at cn.fujitsu.com>
---
 kexec/kexec.c |    5 +++--
 kexec/kexec.h |    4 ----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/kexec/kexec.c b/kexec/kexec.c
index cf3fcb9..53d6edc 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -434,8 +434,9 @@ static int find_segment_hole(struct kexec_info *info,
 	return *size;
 }
 
-int add_backup_segments(struct kexec_info *info, unsigned long backup_base,
-			unsigned long backup_size)
+static int add_backup_segments(struct kexec_info *info,
+			       unsigned long backup_base,
+			       unsigned long backup_size)
 {
 	unsigned long mem_base, mem_size, bkseg_base, bkseg_size, start, end;
 	unsigned long pagesize;
diff --git a/kexec/kexec.h b/kexec/kexec.h
index 5ded390..715b568 100644
--- a/kexec/kexec.h
+++ b/kexec/kexec.h
@@ -285,10 +285,6 @@ int kexec_iomem_for_each_line(char *match,
 int parse_iomem_single(char *str, uint64_t *start, uint64_t *end);
 const char * proc_iomem(void);
 
-extern int add_backup_segments(struct kexec_info *info,
-			       unsigned long backup_base,
-			       unsigned long backup_size);
-
 #define MAX_LINE	160
 
 char *concat_cmdline(const char *base, const char *append);
-- 
1.7.1



More information about the kexec mailing list