ddr: altera: Internal mem_calibrate() cleanup part 4
authorMarek Vasut <marex@denx.de>
Fri, 17 Jul 2015 00:40:21 +0000 (02:40 +0200)
committerMarek Vasut <marex@denx.de>
Sat, 8 Aug 2015 12:14:16 +0000 (14:14 +0200)
This is kind of microseries-within-series indent cleanup.
Rework the code for the last loop within the mega-loop
to make it actually readable and not an insane cryptic pile
of indent failure.

It is likely that this patch has checkpatch warnings, but
for the sake of not breaking the code, these are ignored.

No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
drivers/ddr/altera/sequencer.c

index 7384c169a0051c7903f5e1bc5be6679ae81e8602..5e3fec3e998632a15c4cbe0d0acf7448958e4347 100644 (file)
@@ -3419,17 +3419,19 @@ static uint32_t mem_calibrate(void)
                if (failing_groups != 0)
                        return 0;
 
+               if (STATIC_CALIB_STEPS & CALIB_SKIP_LFIFO)
+                       continue;
+
+               /*
+                * If we're skipping groups as part of debug,
+                * don't calibrate LFIFO.
+                */
+               if (param->skip_groups != 0)
+                       continue;
+
                /* Calibrate the LFIFO */
-               if (!((STATIC_CALIB_STEPS) & CALIB_SKIP_LFIFO)) {
-                       /*
-                        * If we're skipping groups as part of debug,
-                        * don't calibrate LFIFO.
-                        */
-                       if (param->skip_groups == 0) {
-                               if (!rw_mgr_mem_calibrate_lfifo())
-                                       return 0;
-                       }
-               }
+               if (!rw_mgr_mem_calibrate_lfifo())
+                       return 0;
        }
 
        /*