From 2d8a0c01e5fc43f708c53aae18f8141963766ed6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 18 Feb 2020 17:55:24 +0000 Subject: [PATCH] Fix the following -Werror warning from clang 10.0.0: sys/arm/allwinner/clkng/aw_clk_mipi.c:144:6: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] m++; ^ sys/arm/allwinner/clkng/aw_clk_mipi.c:142:5: note: previous statement is here if (best == *fout) ^ Move the increment operations into the for loop headers instead. Discussed with: manu MFC after: 3 days --- sys/arm/allwinner/clkng/aw_clk_mipi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/arm/allwinner/clkng/aw_clk_mipi.c b/sys/arm/allwinner/clkng/aw_clk_mipi.c index 9f8846cab1bf..a0a64cb4330b 100644 --- a/sys/arm/allwinner/clkng/aw_clk_mipi.c +++ b/sys/arm/allwinner/clkng/aw_clk_mipi.c @@ -129,9 +129,9 @@ aw_clk_mipi_find_best(struct aw_clk_mipi_sc *sc, uint64_t fparent, uint64_t *fou *factor_k = 0; *factor_m = 0; - for (n = aw_clk_factor_get_min(&sc->n); n <= aw_clk_factor_get_max(&sc->n); ) { - for (k = aw_clk_factor_get_min(&sc->k); k <= aw_clk_factor_get_max(&sc->k); ) { - for (m = aw_clk_factor_get_min(&sc->m); m <= aw_clk_factor_get_max(&sc->m); ) { + for (n = aw_clk_factor_get_min(&sc->n); n <= aw_clk_factor_get_max(&sc->n); n++) { + for (k = aw_clk_factor_get_min(&sc->k); k <= aw_clk_factor_get_max(&sc->k); k++) { + for (m = aw_clk_factor_get_min(&sc->m); m <= aw_clk_factor_get_max(&sc->m); m++) { cur = (fparent * n * k) / m; if ((*fout - cur) < (*fout - best)) { best = cur; @@ -141,11 +141,8 @@ aw_clk_mipi_find_best(struct aw_clk_mipi_sc *sc, uint64_t fparent, uint64_t *fou } if (best == *fout) return (best); - m++; } - k++; } - n++; } return best;