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

* Re: [PATCH linux-next] clk: keystone: sci-clk: change `struct sci_clk **clk` to `struct sci_clk *clk`
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2022-04-23  2:06 UTC (permalink / raw)
  To: Guo Zhengkui, Michael Turquette, Nishanth Menon,
	Santosh Shilimkar, Tero Kristo, linux-clk, linux-kernel
  Cc: zhengkui_guo, Guo Zhengkui

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.

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

* Re: [PATCH linux-next] clk: keystone: sci-clk: change `struct sci_clk **clk` to `struct sci_clk *clk`
  2022-04-23  2:06 ` Stephen Boyd
@ 2022-04-23 14:26   ` Nishanth Menon
  0 siblings, 0 replies; 3+ messages in thread
From: Nishanth Menon @ 2022-04-23 14:26 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Guo Zhengkui, Michael Turquette, Santosh Shilimkar, Tero Kristo,
	linux-clk, linux-kernel, zhengkui_guo

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

^ 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®