summaryrefslogtreecommitdiff
path: root/kexec/arch/ppc64
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2015-10-06 17:55:48 -0500
committerSimon Horman <horms@verge.net.au>2015-10-16 10:46:26 +0900
commitfaef3d02bb0d365a3975c3bca7c948217db36227 (patch)
tree8f594a838e49d79767703d966ee9cef72ad70fff /kexec/arch/ppc64
parent626b441109b6d6be49e3c69fdf8dbf1bf3c56bca (diff)
ppc64: Fix warnings
Produce a warning-free build on ppc64 (at least, when built as 64-bit userspace -- if a 64-bit binary for ppc64 is a requirement, why is -m64 set only on purgatory?). Mostly unused (or write-only) variable warnings, but also one nasty one where reserve() was used without a prototype, causing long long arguments to be passed as int. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/ppc64')
-rw-r--r--kexec/arch/ppc64/crashdump-ppc64.c3
-rw-r--r--kexec/arch/ppc64/kexec-elf-ppc64.c9
2 files changed, 3 insertions, 9 deletions
diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c
index 6214b83..b3c8928 100644
--- a/kexec/arch/ppc64/crashdump-ppc64.c
+++ b/kexec/arch/ppc64/crashdump-ppc64.c
@@ -33,6 +33,7 @@
#include "../../kexec-syscall.h"
#include "../../crashdump.h"
#include "kexec-ppc64.h"
+#include "../../fs2dt.h"
#include "crashdump-ppc64.h"
static struct crash_elf_info elf_info64 =
@@ -187,7 +188,7 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges)
DIR *dir, *dmem;
FILE *file;
struct dirent *dentry, *mentry;
- int i, n, crash_rng_len = 0;
+ int n, crash_rng_len = 0;
unsigned long long start, end;
int page_size;
diff --git a/kexec/arch/ppc64/kexec-elf-ppc64.c b/kexec/arch/ppc64/kexec-elf-ppc64.c
index 4a1540e..adcee4c 100644
--- a/kexec/arch/ppc64/kexec-elf-ppc64.c
+++ b/kexec/arch/ppc64/kexec-elf-ppc64.c
@@ -97,7 +97,6 @@ int elf_ppc64_load(int argc, char **argv, const char *buf, off_t len,
struct mem_ehdr ehdr;
char *cmdline, *modified_cmdline = NULL;
const char *devicetreeblob;
- int cmdline_len, modified_cmdline_len;
uint64_t max_addr, hole_addr;
char *seg_buf = NULL;
off_t seg_size = 0;
@@ -107,7 +106,6 @@ int elf_ppc64_load(int argc, char **argv, const char *buf, off_t len,
uint64_t *rsvmap_ptr;
struct bootblock *bb_ptr;
#endif
- int i;
int result, opt;
uint64_t my_kernel, my_dt_offset;
uint64_t my_opal_base = 0, my_opal_entry = 0;
@@ -162,10 +160,7 @@ int elf_ppc64_load(int argc, char **argv, const char *buf, off_t len,
}
}
- cmdline_len = 0;
- if (cmdline)
- cmdline_len = strlen(cmdline) + 1;
- else
+ if (!cmdline)
fprintf(stdout, "Warning: append= option is not passed. Using the first kernel root partition\n");
if (ramdisk && reuse_initrd)
@@ -181,7 +176,6 @@ int elf_ppc64_load(int argc, char **argv, const char *buf, off_t len,
strncpy(modified_cmdline, cmdline, COMMAND_LINE_SIZE);
modified_cmdline[COMMAND_LINE_SIZE - 1] = '\0';
}
- modified_cmdline_len = strlen(modified_cmdline);
}
/* Parse the Elf file */
@@ -219,7 +213,6 @@ int elf_ppc64_load(int argc, char **argv, const char *buf, off_t len,
return -1;
/* Use new command line. */
cmdline = modified_cmdline;
- cmdline_len = strlen(modified_cmdline) + 1;
}
/* Add v2wrap to the current image */