lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220406050321.26177-1-guozhengkui@vivo.com>
Date:   Wed,  6 Apr 2022 13:02:32 +0800
From:   Guo Zhengkui <guozhengkui@...o.com>
To:     Nishanth Menon <nm@...com>, Tero Kristo <kristo@...nel.org>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        linux-kernel@...r.kernel.org (open list:ARM/TEXAS INSTRUMENT KEYSTONE
        CLOCK FRAMEWORK),
        linux-clk@...r.kernel.org (open list:COMMON CLK FRAMEWORK)
Cc:     zhengkui_guo@...look.com, Guo Zhengkui <guozhengkui@...o.com>
Subject: [PATCH linux-next] clk: keystone: sci-clk: change `struct sci_clk **clk` to `struct sci_clk *clk`

`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@...o.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ