mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH linux-next] clk: keystone: sci-clk: change `struct sci_clk **clk` to `struct sci_clk *clk`
@ 2022-04-06  5:02 Guo Zhengkui
  2022-04-23  2:06 ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Guo Zhengkui @ 2022-04-06  5:02 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Santosh Shilimkar,
	Michael Turquette, Stephen Boyd,
	open list:ARM/TEXAS INSTRUMENT KEYSTONE CLOCK FRAMEWORK,
	open list:COMMON CLK FRAMEWORK
  Cc: zhengkui_guo, Guo Zhengkui

`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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-23 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06  5:02 [PATCH linux-next] clk: keystone: sci-clk: change `struct sci_clk **clk` to `struct sci_clk *clk` Guo Zhengkui
2022-04-23  2:06 ` Stephen Boyd
2022-04-23 14:26   ` Nishanth Menon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®