drivers/clk/keystone/sci-clk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
`struct sci_clk **clk` is unnecessary. Change it to `struct sci_clk *clk`.
Also fix functions relating to it.
Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
---
drivers/clk/keystone/sci-clk.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c
index 7e1b136e71ae..2c3e4fcfd441 100644
--- a/drivers/clk/keystone/sci-clk.c
+++ b/drivers/clk/keystone/sci-clk.c
@@ -362,7 +362,7 @@ static int _sci_clk_build(struct sci_clk_provider *provider,
static int _cmp_sci_clk(const void *a, const void *b)
{
const struct sci_clk *ca = a;
- const struct sci_clk *cb = *(struct sci_clk **)b;
+ const struct sci_clk *cb = b;
if (ca->dev_id == cb->dev_id && ca->clk_id == cb->clk_id)
return 0;
@@ -385,7 +385,7 @@ static int _cmp_sci_clk(const void *a, const void *b)
static struct clk_hw *sci_clk_get(struct of_phandle_args *clkspec, void *data)
{
struct sci_clk_provider *provider = data;
- struct sci_clk **clk;
+ struct sci_clk *clk;
struct sci_clk key;
if (clkspec->args_count != 2)
@@ -400,7 +400,7 @@ static struct clk_hw *sci_clk_get(struct of_phandle_args *clkspec, void *data)
if (!clk)
return ERR_PTR(-ENODEV);
- return &(*clk)->hw;
+ return &clk->hw;
}
static int ti_sci_init_clocks(struct sci_clk_provider *p)
@@ -509,7 +509,7 @@ static int _cmp_sci_clk_list(void *priv, const struct list_head *a,
struct sci_clk *ca = container_of(a, struct sci_clk, node);
struct sci_clk *cb = container_of(b, struct sci_clk, node);
- return _cmp_sci_clk(ca, &cb);
+ return _cmp_sci_clk(ca, cb);
}
static int ti_sci_scan_clocks_from_dt(struct sci_clk_provider *provider)
--
2.20.1
Quoting Guo Zhengkui (2022-04-05 22:02:32) > `struct sci_clk **clk` is unnecessary. Change it to `struct sci_clk *clk`. > > Also fix functions relating to it. > > Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com> > --- Waiting for Nishanth to review.
On 19:06-20220422, Stephen Boyd wrote: > Quoting Guo Zhengkui (2022-04-05 22:02:32) > > `struct sci_clk **clk` is unnecessary. Change it to `struct sci_clk *clk`. > > > > Also fix functions relating to it. > > > > Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com> > > --- > > Waiting for Nishanth to review. Sorry, this has to be a NAK from me. Broke all the K3 boards. I have'nt dug to see why exactly. https://gist.github.com/nmenon/de29ec88efc9f83acc4a8d2c13580290 Compare vanilla next-20220422: https://gist.github.com/nmenon/de29ec88efc9f83acc4a8d2c13580290#file-next-20220422-L631 Vs next-20220422 + this patch: https://gist.github.com/nmenon/de29ec88efc9f83acc4a8d2c13580290#file-next-20220422-patch-L631 Just posting am64xx-evm log, all other platforms follow the same pattern. -- Regards, Nishanth Menon Key (0xDDB5849D1736249D)/Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
© 2016 - 2026 Red Hat, Inc.