Should be no logic change, use continue to avoid an indent.

Signed-off-by: Michael Ellerman <mich...@ellerman.id.au>
---
 arch/powerpc/xmon/xmon.c |   72 ++++++++++++++++++++++++----------------------
 1 file changed, 38 insertions(+), 34 deletions(-)

diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index a8188f0..0fefe03 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2994,33 +2994,35 @@ static void stop_spus(void)
                if (!spu_info[i].spu)
                        continue;
 
-               if (setjmp(bus_error_jmp) == 0) {
-                       catch_memory_errors = 1;
-                       sync();
+               if (setjmp(bus_error_jmp) != 0) {
+                       catch_memory_errors = 0;
+                       printf("*** Error stopping spu %.2d\n", i);
+                       continue;
+               }
 
-                       spu = spu_info[i].spu;
+               catch_memory_errors = 1;
+               sync();
 
-                       spu_info[i].saved_spu_runcntl_RW =
-                               in_be32(&spu->problem->spu_runcntl_RW);
+               spu = spu_info[i].spu;
 
-                       tmp = spu_mfc_sr1_get(spu);
-                       spu_info[i].saved_mfc_sr1_RW = tmp;
+               spu_info[i].saved_spu_runcntl_RW =
+                       in_be32(&spu->problem->spu_runcntl_RW);
 
-                       tmp &= ~MFC_STATE1_MASTER_RUN_CONTROL_MASK;
-                       spu_mfc_sr1_set(spu, tmp);
+               tmp = spu_mfc_sr1_get(spu);
+               spu_info[i].saved_mfc_sr1_RW = tmp;
 
-                       sync();
-                       __delay(200);
+               tmp &= ~MFC_STATE1_MASTER_RUN_CONTROL_MASK;
+               spu_mfc_sr1_set(spu, tmp);
 
-                       spu_info[i].stopped_ok = 1;
+               sync();
+               __delay(200);
+
+               spu_info[i].stopped_ok = 1;
+
+               printf("Stopped spu %.2d (was %s)\n", i,
+                               spu_info[i].saved_spu_runcntl_RW ?
+                               "running" : "stopped");
 
-                       printf("Stopped spu %.2d (was %s)\n", i,
-                                       spu_info[i].saved_spu_runcntl_RW ?
-                                       "running" : "stopped");
-               } else {
-                       catch_memory_errors = 0;
-                       printf("*** Error stopping spu %.2d\n", i);
-               }
                catch_memory_errors = 0;
        }
 }
@@ -3040,23 +3042,25 @@ static void restart_spus(void)
                        continue;
                }
 
-               if (setjmp(bus_error_jmp) == 0) {
-                       catch_memory_errors = 1;
-                       sync();
-
-                       spu = spu_info[i].spu;
-                       spu_mfc_sr1_set(spu, spu_info[i].saved_mfc_sr1_RW);
-                       out_be32(&spu->problem->spu_runcntl_RW,
-                                       spu_info[i].saved_spu_runcntl_RW);
-
-                       sync();
-                       __delay(200);
-
-                       printf("Restarted spu %.2d\n", i);
-               } else {
+               if (setjmp(bus_error_jmp) != 0) {
                        catch_memory_errors = 0;
                        printf("*** Error restarting spu %.2d\n", i);
+                       continue;
                }
+
+               catch_memory_errors = 1;
+               sync();
+
+               spu = spu_info[i].spu;
+               spu_mfc_sr1_set(spu, spu_info[i].saved_mfc_sr1_RW);
+               out_be32(&spu->problem->spu_runcntl_RW,
+                               spu_info[i].saved_spu_runcntl_RW);
+
+               sync();
+               __delay(200);
+
+               printf("Restarted spu %.2d\n", i);
+
                catch_memory_errors = 0;
        }
 }
-- 
1.7.9.5

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to