[PATCH v2 8/8] cleanup: remove unused page_is_fractional

Petr Tesarik ptesarik at suse.cz
Fri Mar 6 05:28:34 PST 2015


This function is no longer needed, because mappage_elf() now checks
whether the region is contiguous both in physical addresses and in
file offsets.

Signed-off-by: Petr Tesarik <ptesarik at suse.cz>
---
 elf_info.c | 16 ----------------
 elf_info.h |  2 --
 2 files changed, 18 deletions(-)

diff --git a/elf_info.c b/elf_info.c
index 8bce942..f584393 100644
--- a/elf_info.c
+++ b/elf_info.c
@@ -583,22 +583,6 @@ offset_to_pt_load_end(off_t offset)
 	return pt_load_end;
 }
 
-/*
- * Judge whether the page is fractional or not.
- */
-int
-page_is_fractional(off_t page_offset)
-{
-	if (page_offset % info->page_size != 0)
-		return TRUE;
-
-	if (offset_to_pt_load_end(page_offset) - page_offset
-	    < info->page_size)
-		return TRUE;
-
-	return FALSE;
-}
-
 unsigned long long
 vaddr_to_paddr_general(unsigned long long vaddr)
 {
diff --git a/elf_info.h b/elf_info.h
index e712253..7ae6bf8 100644
--- a/elf_info.h
+++ b/elf_info.h
@@ -40,8 +40,6 @@ unsigned long long vaddr_to_paddr_general(unsigned long long vaddr);
 off_t vaddr_to_offset_slow(int fd, char *filename, unsigned long long vaddr);
 unsigned long long get_max_paddr(void);
 
-int page_is_fractional(off_t page_offset);
-
 int get_elf64_ehdr(int fd, char *filename, Elf64_Ehdr *ehdr);
 int get_elf32_ehdr(int fd, char *filename, Elf32_Ehdr *ehdr);
 int get_elf_info(int fd, char *filename);
-- 
1.8.4.5




More information about the kexec mailing list