From: Geoff Levand <geoffrey.levand@am.sony.com>
To: kexec@lists.infradead.org
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Subject: [patch 3/5] kexec add strict-prototypes
Date: Mon, 07 May 2007 17:02:56 -0700 [thread overview]
Message-ID: <463FBE30.8080500@am.sony.com> (raw)
In-Reply-To: <20070507235727.631477448@am.sony.com>>
Add -Wstrict-prototypes to EXTRA_CFLAGS and fix the powerpc compiler warnings.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
configure.ac | 2 -
kexec/arch/ppc64/kexec-ppc64.c | 61 +++++++++++++++++++----------------------
2 files changed, 30 insertions(+), 33 deletions(-)
--- kexec-tools-hacked.orig/configure.ac
+++ kexec-tools-hacked/configure.ac
@@ -59,7 +59,7 @@ if test "${host_alias}" ; then
OBJDIR="$OBJDIR-${host_alias}"
fi
-EXTRA_CFLAGS='-Wall -g -fno-strict-aliasing $(CPPFLAGS) $(EXTRA_CPPFLAGS)'
+EXTRA_CFLAGS='-Wall -g -fno-strict-aliasing -Wstrict-prototypes $(CPPFLAGS) $(EXTRA_CPPFLAGS)'
BUILD_CFLAGS='-O2 -Wall $(CPPFLAGS)'
# Check whether ppc64. Add -m64 for building 64-bit binary
--- kexec-tools-hacked.orig/kexec/arch/ppc64/kexec-ppc64.c
+++ kexec-tools-hacked/kexec/arch/ppc64/kexec-ppc64.c
@@ -45,10 +45,7 @@ unsigned long long crash_base, crash_siz
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;
--
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2007-05-08 0:21 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070507235727.631477448@am.sony.com>
2007-05-08 0:02 ` [patch 1/5] kexec debug output improvments Geoff Levand
2007-05-08 6:08 ` Simon Horman
2007-05-08 14:40 ` Geoff Levand
2007-05-09 6:47 ` Simon Horman
2007-05-08 6:12 ` use dprintf Simon Horman
2007-05-09 21:40 ` [patch 1/2] kexec remove last remaining dfprintf Geoff Levand
2007-05-10 2:13 ` Simon Horman
2007-05-10 2:55 ` Simon Horman
2007-05-09 21:40 ` [patch 2/2] kexec rename dprintf to dbgprintf Geoff Levand
2007-05-10 2:14 ` Simon Horman
2007-05-10 2:55 ` Simon Horman
2007-05-10 22:10 ` kexec and kdb Preetesh Parekh
2007-05-11 4:23 ` Vivek Goyal
2007-05-14 23:20 ` Preetesh Parekh
2007-05-15 7:54 ` Vivek Goyal
2007-05-16 17:45 ` Preetesh Parekh
2007-05-08 6:20 ` [patch 1/5] kexec debug output improvments Vivek Goyal
2007-05-08 7:24 ` Simon Horman
2007-05-08 14:36 ` Geoff Levand
2007-05-08 16:02 ` Vivek Goyal
2007-05-09 1:11 ` Geoff Levand
2007-05-09 4:19 ` Vivek Goyal
2007-05-08 0:02 ` [patch 2/5] kexec improve build for ppc64 Geoff Levand
2007-05-08 6:07 ` Simon Horman
2007-05-08 0:02 ` Geoff Levand [this message]
2007-05-08 2:38 ` [patch 3/5] kexec add strict-prototypes Simon Horman
2007-05-08 14:56 ` Geoff Levand
2007-05-09 0:33 ` [patch 1/2] " Geoff Levand
2007-05-09 6:48 ` Simon Horman
2007-05-09 0:33 ` [patch 2/2] kexec fix prototypes for ppc64 Geoff Levand
2007-05-09 6:48 ` Simon Horman
2007-05-08 0:03 ` [patch 4/5] Add proper node alignment for the powerpc device-tree cmdline Geoff Levand
2007-05-08 6:13 ` Simon Horman
2007-05-08 14:50 ` Milton Miller
2007-05-08 0:03 ` [patch 5/5] kexec fix ppc64 device-tree mem node Geoff Levand
2007-05-08 6:14 ` Simon Horman
2007-05-08 14:57 ` Spam:****, " Milton Miller
2007-05-08 6:35 ` Mohan Kumar M
2007-05-08 8:20 ` David Woodhouse
2007-05-09 2:39 ` [patch v2] " Geoff Levand
2007-05-09 22:35 ` [patch v3] " Geoff Levand
2007-05-14 19:08 ` Geoff Levand
2007-05-15 4:38 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=463FBE30.8080500@am.sony.com \
--to=geoffrey.levand@am.sony.com \
--cc=kexec@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox