From: Milton Miller <miltonm@bga.com>
To: Simon Horman <horms@verge.net.au>, <kexec@lists.infradead.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH kexec-tools 5/5] entry wants to be void *
Date: Fri, 02 Jan 2009 15:04:51 -0600 [thread overview]
Message-ID: <kexec-29-1-5r.miltonm@bga.com> (raw)
In-Reply-To: <kexec-29-1.miltonm@bga.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2272 bytes --]
The kexec info struct defines entry to be a void *, so pass around the
user supplied value as one.
This fixes the following warning:
gcc -g -O2 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc64/include -c -MD -o kexec/kexec.o kexec/kexec.c
kexec/kexec.c: In function ‘my_load’:
kexec/kexec.c:773: warning: assignment makes pointer from integer without a cast
Signed-off-by: Milton Miller <miltonm@bga.com>
---
Index: kexec-tools/kexec/kexec.c
===================================================================
--- kexec-tools.orig/kexec/kexec.c 2009-01-02 02:54:37.000000000 -0600
+++ kexec-tools/kexec/kexec.c 2009-01-02 02:55:06.000000000 -0600
@@ -666,7 +666,7 @@ static void update_purgatory(struct kexe
* Load the new kernel
*/
static int my_load(const char *type, int fileind, int argc, char **argv,
- unsigned long kexec_flags, unsigned long entry)
+ unsigned long kexec_flags, void *entry)
{
char *kernel;
char *kernel_buf;
@@ -846,23 +846,20 @@ static int my_exec(void)
static int kexec_loaded(void);
-static int load_jump_back_helper_image(unsigned long kexec_flags,
- unsigned long entry)
+static int load_jump_back_helper_image(unsigned long kexec_flags, void *entry)
{
int result;
struct kexec_segment seg;
memset(&seg, 0, sizeof(seg));
- result = kexec_load((void *)entry, 1, &seg,
- kexec_flags);
+ result = kexec_load(entry, 1, &seg, kexec_flags);
return result;
}
/*
* Jump back to the original kernel
*/
-static int my_load_jump_back_helper(unsigned long kexec_flags,
- unsigned long entry)
+static int my_load_jump_back_helper(unsigned long kexec_flags, void *entry)
{
int result;
@@ -1036,7 +1033,7 @@ int main(int argc, char *argv[])
int do_ifdown = 0;
int do_unload = 0;
int do_reuse_initrd = 0;
- unsigned long entry = 0;
+ void *entry = 0;
char *type = 0;
char *endptr;
int opt;
@@ -1096,7 +1093,7 @@ int main(int argc, char *argv[])
kexec_flags = KEXEC_PRESERVE_CONTEXT;
break;
case OPT_ENTRY:
- entry = strtoul(optarg, &endptr, 0);
+ entry = (void *)strtoul(optarg, &endptr, 0);
if (*endptr) {
fprintf(stderr,
"Bad option value in --load-jump-back-helper=%s\n",
next prev parent reply other threads:[~2009-01-02 21:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-02 20:42 [PATCH 0/5 + 2] kexec updates Milton Miller
2009-01-02 20:44 ` Milton Miller
2009-01-02 20:44 ` Milton Miller
2009-01-02 20:44 ` Milton Miller
2009-01-02 20:44 ` Milton Miller
2009-01-02 20:46 ` [PATCH] powerpc: make dummy section a valid note header Milton Miller
2009-01-02 20:46 ` [PATCH] powerpc: check crash_base for relocatable kernel Milton Miller
2009-01-06 23:44 ` Michael Ellerman
2009-01-07 14:57 ` Milton Miller
2009-01-08 3:35 ` Michael Ellerman
2009-01-02 21:04 ` [PATCH kexec-tools 1/5] ppc64: always check number of ranges when adding Milton Miller
2009-01-07 2:42 ` Michael Ellerman
2009-01-07 14:34 ` Milton Miller
2009-01-08 12:33 ` [PATCH kexec-tools v2] ppc64: always check number of ranges when adding them Milton Miller
2009-01-02 21:04 ` [PATCH kexec-tools 2/5] ppc64: update kdump for 2.6.28 relocatable kernel Milton Miller
2009-01-02 21:04 ` [PATCH kexec-tools 4/5] ppc64: cleanups Milton Miller
2009-01-02 21:04 ` Milton Miller [this message]
2009-01-12 6:24 ` [PATCH 0/5 + 2] kexec updates Simon Horman
2009-01-13 4:15 ` M. Mohan Kumar
2009-01-13 15:59 ` Milton Miller
2009-01-15 22:43 ` 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=kexec-29-1-5r.miltonm@bga.com \
--to=miltonm@bga.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).