[PATCH linux-next] clk: keystone: sci-clk: change `struct sci_clk **clk` to `struct sci_clk *clk`

From: Guo Zhengkui
Date: Wed Apr 06 2022 - 01:57:34 EST


`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@xxxxxxxx>
---
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