summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2007-05-08 17:33:22 -0700
committerSimon Horman <horms@verge.net.au>2007-05-09 15:42:44 +0900
commitc58ed3b1b4f538bbd784ee3087e4d5e467637fcf (patch)
tree169a6ae6fd95778fc743087b9349daf29623d895
parentdf5a80b73b34da3c8021608489400cb949e2f2e3 (diff)
kexec fix prototypes for ppc64
Fixup the ppc64 files to remove warnings generated by the -Wstrict-prototypes compiler flag. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/ppc64/kexec-ppc64.c61
1 files changed, 29 insertions, 32 deletions
diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
index 22d6d66..b8cd2a9 100644
--- a/kexec/arch/ppc64/kexec-ppc64.c
+++ b/kexec/arch/ppc64/kexec-ppc64.c
@@ -45,10 +45,7 @@ unsigned long long crash_base, crash_size;
unsigned int rtas_base, rtas_size;
int max_memory_ranges;
-static int sort_base_ranges();
-
-
-static void cleanup_memory_ranges()
+static void cleanup_memory_ranges(void)
{
if (memory_range)
free(memory_range);
@@ -64,7 +61,7 @@ static void cleanup_memory_ranges()
* Allocate memory for various data structures used to hold
* values of different memory ranges
*/
-static int alloc_memory_ranges()
+static int alloc_memory_ranges(void)
{
int memory_range_len;
@@ -105,7 +102,7 @@ err1:
* max_memory_ranges variable. This variable replaces MAX_MEMORY_RANGES
* macro used earlier.
*/
-static int count_memory_ranges()
+static int count_memory_ranges(void)
{
char device_tree[256] = "/proc/device-tree/";
struct dirent *dentry;
@@ -132,8 +129,32 @@ static int count_memory_ranges()
return 0;
}
+/* Sort the base ranges in memory - this is useful for ensuring that our
+ * ranges are in ascending order, even if device-tree read of memory nodes
+ * is done differently. Also, could be used for other range coalescing later
+ */
+static int sort_base_ranges(void)
+{
+ int i, j;
+ unsigned long long tstart, tend;
+
+ for (i = 0; i < nr_memory_ranges - 1; i++) {
+ for (j = 0; j < nr_memory_ranges - i - 1; j++) {
+ if (base_memory_range[j].start > base_memory_range[j+1].start) {
+ tstart = base_memory_range[j].start;
+ tend = base_memory_range[j].end;
+ base_memory_range[j].start = base_memory_range[j+1].start;
+ base_memory_range[j].end = base_memory_range[j+1].end;
+ base_memory_range[j+1].start = tstart;
+ base_memory_range[j+1].end = tend;
+ }
+ }
+ }
+ return 0;
+}
+
/* Get base memory ranges */
-static int get_base_ranges()
+static int get_base_ranges(void)
{
int local_memory_ranges = 0;
char device_tree[256] = "/proc/device-tree/";
@@ -204,32 +225,8 @@ static int get_base_ranges()
return 0;
}
-/* Sort the base ranges in memory - this is useful for ensuring that our
- * ranges are in ascending order, even if device-tree read of memory nodes
- * is done differently. Also, could be used for other range coalescing later
- */
-static int sort_base_ranges()
-{
- int i, j;
- unsigned long long tstart, tend;
-
- for (i = 0; i < nr_memory_ranges - 1; i++) {
- for (j = 0; j < nr_memory_ranges - i - 1; j++) {
- if (base_memory_range[j].start > base_memory_range[j+1].start) {
- tstart = base_memory_range[j].start;
- tend = base_memory_range[j].end;
- base_memory_range[j].start = base_memory_range[j+1].start;
- base_memory_range[j].end = base_memory_range[j+1].end;
- base_memory_range[j+1].start = tstart;
- base_memory_range[j+1].end = tend;
- }
- }
- }
- return 0;
-}
-
/* Sort the exclude ranges in memory */
-static int sort_ranges()
+static int sort_ranges(void)
{
int i, j;
unsigned long long tstart, tend;