git: 888a60295912 - main - imx_clk_composite: Mark two variables only used in debug traces as unused.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 09 Apr 2022 00:28:15 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=888a60295912ec9314a58c9a603e0d821e091c1b
commit 888a60295912ec9314a58c9a603e0d821e091c1b
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-09 00:25:15 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-09 00:25:15 +0000
imx_clk_composite: Mark two variables only used in debug traces as unused.
While here, make best_post_div track the best value of post_div rather
than pre_div so that the debug trace doesn't just print the same value
twice.
---
sys/arm64/freescale/imx/clk/imx_clk_composite.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sys/arm64/freescale/imx/clk/imx_clk_composite.c b/sys/arm64/freescale/imx/clk/imx_clk_composite.c
index 982ca2c6332f..4368267954bd 100644
--- a/sys/arm64/freescale/imx/clk/imx_clk_composite.c
+++ b/sys/arm64/freescale/imx/clk/imx_clk_composite.c
@@ -212,7 +212,8 @@ imx_clk_composite_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout
const char **p_names;
int p_idx, best_parent;
int64_t best_diff, diff;
- int32_t best_pre_div, best_post_div, pre_div, post_div;
+ int32_t best_pre_div __unused, best_post_div __unused;
+ int32_t pre_div, post_div;
uint64_t cur, best;
uint32_t val;
@@ -236,7 +237,7 @@ imx_clk_composite_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout
best = cur;
best_diff = diff;
best_pre_div = pre_div;
- best_post_div = pre_div;
+ best_post_div = post_div;
best_parent = p_idx;
dprintf("Best parent so far %s (%d) with best freq at "
"%ju\n", clknode_get_name(p_clk), p_idx, best);