generic: fix kexec build error for MIPS with gcc-4.6-linaro
authorGabor Juhos <juhosg@openwrt.org>
Thu, 9 Feb 2012 14:06:44 +0000 (14:06 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Thu, 9 Feb 2012 14:06:44 +0000 (14:06 +0000)
SVN-Revision: 30395

target/linux/generic/patches-2.6.39/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch
target/linux/generic/patches-3.0/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch
target/linux/generic/patches-3.1/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch
target/linux/generic/patches-3.2/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch
target/linux/generic/patches-3.3/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch

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