git: 3d9bd8252205 - main - qcom_clk: compilation fixes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 13 Sep 2022 03:10:52 UTC
The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=3d9bd8252205c5e4b02a68cf5345bcdc3cbb5239 commit 3d9bd8252205c5e4b02a68cf5345bcdc3cbb5239 Author: Adrian Chadd <adrian@FreeBSD.org> AuthorDate: 2022-09-12 02:33:18 +0000 Commit: Adrian Chadd <adrian@FreeBSD.org> CommitDate: 2022-09-13 03:10:25 +0000 qcom_clk: compilation fixes * remove dead code * mark enabled as unused, happens if debugging isn't enabled * log the enabled state if debugging is enabled Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D36533 --- sys/dev/qcom_clk/qcom_clk_apssdiv.c | 3 --- sys/dev/qcom_clk/qcom_clk_rcg2.c | 8 +++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/dev/qcom_clk/qcom_clk_apssdiv.c b/sys/dev/qcom_clk/qcom_clk_apssdiv.c index 75216ba60172..d76c5953f278 100644 --- a/sys/dev/qcom_clk/qcom_clk_apssdiv.c +++ b/sys/dev/qcom_clk/qcom_clk_apssdiv.c @@ -131,9 +131,6 @@ qcom_clk_apssdiv_get_gate_locked(struct qcom_clk_apssdiv_sc *sc) static int qcom_clk_apssdiv_init(struct clknode *clk, device_t dev) { - struct qcom_clk_apssdiv_sc *sc; - - sc = clknode_get_softc(clk); /* * There's only a single parent here for an fixed divisor, diff --git a/sys/dev/qcom_clk/qcom_clk_rcg2.c b/sys/dev/qcom_clk/qcom_clk_rcg2.c index 6257f79259fe..b6ae03e02ced 100644 --- a/sys/dev/qcom_clk/qcom_clk_rcg2.c +++ b/sys/dev/qcom_clk/qcom_clk_rcg2.c @@ -265,7 +265,7 @@ qcom_clk_rcg2_init(struct clknode *clk, device_t dev) struct qcom_clk_rcg2_sc *sc; uint32_t reg; uint32_t idx; - bool enabled; + bool enabled __unused; sc = clknode_get_softc(clk); @@ -282,6 +282,7 @@ qcom_clk_rcg2_init(struct clknode *clk, device_t dev) enabled = false; else enabled = true; + /* mux settings */ CLKDEV_READ_4(clknode_get_device(sc->clknode), QCOM_CLK_RCG2_CFG_OFFSET(sc), ®); @@ -289,8 +290,9 @@ qcom_clk_rcg2_init(struct clknode *clk, device_t dev) idx = (reg & QCOM_CLK_RCG2_CFG_SRC_SEL_MASK) >> QCOM_CLK_RCG2_CFG_SRC_SEL_SHIFT; - DPRINTF(clknode_get_device(sc->clknode), "%s: mux index %u\n", - __func__, idx); + DPRINTF(clknode_get_device(sc->clknode), + "%s: mux index %u, enabled=%d\n", + __func__, idx, enabled); clknode_init_parent_idx(clk, idx); /*