[PATCH 4/6] alpha: Remove bracket errors in bootpz.c

2014-07-15 Thread Nicholas Krause
This patch removes all errors related to brackets not being placed
correctly in this file as declared when running checkpatch on it.
---
 arch/alpha/boot/bootpz.c | 18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 0b5c978..6dd34e4 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -83,11 +83,9 @@ check_range(unsigned long vstart, unsigned long vend,
   vstart, vend, kstart, kend);
 #endif
/* do some range checking for detecting an overlap... */
-   for (vaddr = vstart; vaddr <= vend; vaddr += PAGE_SIZE)
-   {
+   for (vaddr = vstart; vaddr <= vend; vaddr += PAGE_SIZE) {
kaddr = (find_pa(vaddr) | PAGE_OFFSET);
-   if (kaddr >= kstart && kaddr <= kend)
-   {
+   if (kaddr >= kstart && kaddr <= kend) {
 #ifdef DEBUG_CHECK_RANGE
srm_printk("OVERLAP: vaddr 0x%lx kaddr 0x%lx"
   " [0x%lx:0x%lx]\n",
@@ -310,9 +308,8 @@ start_kernel(void)
 
/* Get the parameter list from the console environment variable. */
nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval));
-   if (nbytes < 0 || nbytes >= sizeof(envval)) {
+   if (nbytes < 0 || nbytes >= sizeof(envval))
nbytes = 0;
-   }
envval[nbytes] = '\0';
 
 #ifdef DEBUG_ADDRESSES
@@ -346,8 +343,7 @@ start_kernel(void)
   in conflict.
 */
if (check_range(V_BOOTSTRAPPER_START, V_BOOTSTRAPPER_END,
-   K_KERNEL_DATA_START, K_KERNEL_IMAGE_END))
-   {
+   K_KERNEL_DATA_START, K_KERNEL_IMAGE_END)) {
srm_printk("FATAL ERROR: overlap of bootstrapper code\n");
__halt();
}
@@ -359,8 +355,7 @@ start_kernel(void)
   execution.
 */
if (check_range(V_DATA_START, V_DATA_END,
-   K_KERNEL_IMAGE_START, K_COPY_IMAGE_END))
-   {
+   K_KERNEL_IMAGE_START, K_COPY_IMAGE_END)) {
 #ifdef DEBUG_ADDRESSES
srm_printk("OVERLAP: cannot decompress in place\n");
 #endif
@@ -376,8 +371,7 @@ start_kernel(void)
*/
while (check_range(V_DATA_START, V_DATA_END,
   uncompressed_image_start,
-  uncompressed_image_end))
-   {
+  uncompressed_image_end)) {
 #if 0
uncompressed_image_start += K_COPY_IMAGE_SIZE;
uncompressed_image_end += K_COPY_IMAGE_SIZE;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/6] alpha: Remove bracket errors in bootpz.c

2014-07-15 Thread Nicholas Krause
This patch removes all errors related to brackets not being placed
correctly in this file as declared when running checkpatch on it.
---
 arch/alpha/boot/bootpz.c | 18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 0b5c978..6dd34e4 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -83,11 +83,9 @@ check_range(unsigned long vstart, unsigned long vend,
   vstart, vend, kstart, kend);
 #endif
/* do some range checking for detecting an overlap... */
-   for (vaddr = vstart; vaddr = vend; vaddr += PAGE_SIZE)
-   {
+   for (vaddr = vstart; vaddr = vend; vaddr += PAGE_SIZE) {
kaddr = (find_pa(vaddr) | PAGE_OFFSET);
-   if (kaddr = kstart  kaddr = kend)
-   {
+   if (kaddr = kstart  kaddr = kend) {
 #ifdef DEBUG_CHECK_RANGE
srm_printk(OVERLAP: vaddr 0x%lx kaddr 0x%lx
[0x%lx:0x%lx]\n,
@@ -310,9 +308,8 @@ start_kernel(void)
 
/* Get the parameter list from the console environment variable. */
nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval));
-   if (nbytes  0 || nbytes = sizeof(envval)) {
+   if (nbytes  0 || nbytes = sizeof(envval))
nbytes = 0;
-   }
envval[nbytes] = '\0';
 
 #ifdef DEBUG_ADDRESSES
@@ -346,8 +343,7 @@ start_kernel(void)
   in conflict.
 */
if (check_range(V_BOOTSTRAPPER_START, V_BOOTSTRAPPER_END,
-   K_KERNEL_DATA_START, K_KERNEL_IMAGE_END))
-   {
+   K_KERNEL_DATA_START, K_KERNEL_IMAGE_END)) {
srm_printk(FATAL ERROR: overlap of bootstrapper code\n);
__halt();
}
@@ -359,8 +355,7 @@ start_kernel(void)
   execution.
 */
if (check_range(V_DATA_START, V_DATA_END,
-   K_KERNEL_IMAGE_START, K_COPY_IMAGE_END))
-   {
+   K_KERNEL_IMAGE_START, K_COPY_IMAGE_END)) {
 #ifdef DEBUG_ADDRESSES
srm_printk(OVERLAP: cannot decompress in place\n);
 #endif
@@ -376,8 +371,7 @@ start_kernel(void)
*/
while (check_range(V_DATA_START, V_DATA_END,
   uncompressed_image_start,
-  uncompressed_image_end))
-   {
+  uncompressed_image_end)) {
 #if 0
uncompressed_image_start += K_COPY_IMAGE_SIZE;
uncompressed_image_end += K_COPY_IMAGE_SIZE;
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/