generic: fix kexec build error for MIPS with gcc-4.6-linaro

SVN-Revision: 30395
This commit is contained in:
Gabor Juhos 2012-02-09 14:06:44 +00:00
parent fa11e6e0d6
commit 31a0451cee
5 changed files with 10 additions and 10 deletions

View file

@ -39,7 +39,7 @@
- int i, argc = 0; - int i, argc = 0;
- char *bootloader = "kexec"; - char *bootloader = "kexec";
- int *kexec_argv = (int *)kexec_args[1]; - int *kexec_argv = (int *)kexec_args[1];
+ void __user *buf; + void __user *buf = NULL;
+ size_t bufsz; + size_t bufsz;
+ size_t size; + size_t size;
+ int i; + int i;
@ -92,7 +92,7 @@
+ break; + break;
+ } + }
+ +
+ if (i >= image->nr_segments) + if (!buf)
+ return; + return;
+ +
+ size = KEXEC_MIPS_ARGV_BUF_SIZE - 1; + size = KEXEC_MIPS_ARGV_BUF_SIZE - 1;

View file

@ -39,7 +39,7 @@
- int i, argc = 0; - int i, argc = 0;
- char *bootloader = "kexec"; - char *bootloader = "kexec";
- int *kexec_argv = (int *)kexec_args[1]; - int *kexec_argv = (int *)kexec_args[1];
+ void __user *buf; + void __user *buf = NULL;
+ size_t bufsz; + size_t bufsz;
+ size_t size; + size_t size;
+ int i; + int i;
@ -92,7 +92,7 @@
+ break; + break;
+ } + }
+ +
+ if (i >= image->nr_segments) + if (!buf)
+ return; + return;
+ +
+ size = KEXEC_MIPS_ARGV_BUF_SIZE - 1; + size = KEXEC_MIPS_ARGV_BUF_SIZE - 1;

View file

@ -39,7 +39,7 @@
- int i, argc = 0; - int i, argc = 0;
- char *bootloader = "kexec"; - char *bootloader = "kexec";
- int *kexec_argv = (int *)kexec_args[1]; - int *kexec_argv = (int *)kexec_args[1];
+ void __user *buf; + void __user *buf = NULL;
+ size_t bufsz; + size_t bufsz;
+ size_t size; + size_t size;
+ int i; + int i;
@ -92,7 +92,7 @@
+ break; + break;
+ } + }
+ +
+ if (i >= image->nr_segments) + if (!buf)
+ return; + return;
+ +
+ size = KEXEC_MIPS_ARGV_BUF_SIZE - 1; + size = KEXEC_MIPS_ARGV_BUF_SIZE - 1;

View file

@ -39,7 +39,7 @@
- int i, argc = 0; - int i, argc = 0;
- char *bootloader = "kexec"; - char *bootloader = "kexec";
- int *kexec_argv = (int *)kexec_args[1]; - int *kexec_argv = (int *)kexec_args[1];
+ void __user *buf; + void __user *buf = NULL;
+ size_t bufsz; + size_t bufsz;
+ size_t size; + size_t size;
+ int i; + int i;
@ -92,7 +92,7 @@
+ break; + break;
+ } + }
+ +
+ if (i >= image->nr_segments) + if (!buf)
+ return; + return;
+ +
+ size = KEXEC_MIPS_ARGV_BUF_SIZE - 1; + size = KEXEC_MIPS_ARGV_BUF_SIZE - 1;

View file

@ -39,7 +39,7 @@
- int i, argc = 0; - int i, argc = 0;
- char *bootloader = "kexec"; - char *bootloader = "kexec";
- int *kexec_argv = (int *)kexec_args[1]; - int *kexec_argv = (int *)kexec_args[1];
+ void __user *buf; + void __user *buf = NULL;
+ size_t bufsz; + size_t bufsz;
+ size_t size; + size_t size;
+ int i; + int i;
@ -92,7 +92,7 @@
+ break; + break;
+ } + }
+ +
+ if (i >= image->nr_segments) + if (!buf)
+ return; + return;
+ +
+ size = KEXEC_MIPS_ARGV_BUF_SIZE - 1; + size = KEXEC_MIPS_ARGV_BUF_SIZE - 1;