From: Ville Syrjälä <[email protected]>

Flatten the loop inside sanitize_wm_latency() a bit
by using 'continue'.

Signed-off-by: Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/display/skl_watermark.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c 
b/drivers/gpu/drm/i915/display/skl_watermark.c
index e3305a399ddf..e11ba1a822f4 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -3228,13 +3228,13 @@ static void sanitize_wm_latency(struct intel_display 
*display)
         * of the punit to satisfy this requirement.
         */
        for (level = 1; level < num_levels; level++) {
-               if (wm[level] == 0) {
-                       int i;
+               if (wm[level] != 0)
+                       continue;
 
-                       for (i = level + 1; i < num_levels; i++)
-                               wm[i] = 0;
-                       return;
-               }
+               for (level = level + 1; level < num_levels; level++)
+                       wm[level] = 0;
+
+               return;
        }
 }
 
-- 
2.49.1

Reply via email to