All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH sci-clk] Fix application of sizeof to pointer
@ 2021-10-12  2:19 ` davidcomponentone
  0 siblings, 0 replies; 2+ messages in thread
From: davidcomponentone @ 2021-10-12  2:19 UTC (permalink / raw)
  To: nm
  Cc: kristo, ssantosh, mturquette, sboyd, linux-arm-kernel,
	linux-kernel, linux-clk, David Yang, Zeal Robot

From: David Yang <davidcomponentone@gmail.com>

The coccinelle check report:
"./drivers/clk/keystone/sci-clk.c:398:8-14:
ERROR: application of sizeof to pointer"
Using the "sizeof(*clk)" to fix it.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.com>
---
 drivers/clk/keystone/sci-clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c
index 7e1b136e71ae..010a61a2549c 100644
--- a/drivers/clk/keystone/sci-clk.c
+++ b/drivers/clk/keystone/sci-clk.c
@@ -395,7 +395,7 @@ static struct clk_hw *sci_clk_get(struct of_phandle_args *clkspec, void *data)
 	key.clk_id = clkspec->args[1];
 
 	clk = bsearch(&key, provider->clocks, provider->num_clocks,
-		      sizeof(clk), _cmp_sci_clk);
+		      sizeof(*clk), _cmp_sci_clk);
 
 	if (!clk)
 		return ERR_PTR(-ENODEV);
-- 
2.30.2


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

* [PATCH sci-clk] Fix application of sizeof to pointer
@ 2021-10-12  2:19 ` davidcomponentone
  0 siblings, 0 replies; 2+ messages in thread
From: davidcomponentone @ 2021-10-12  2:19 UTC (permalink / raw)
  To: nm
  Cc: kristo, ssantosh, mturquette, sboyd, linux-arm-kernel,
	linux-kernel, linux-clk, David Yang, Zeal Robot

From: David Yang <davidcomponentone@gmail.com>

The coccinelle check report:
"./drivers/clk/keystone/sci-clk.c:398:8-14:
ERROR: application of sizeof to pointer"
Using the "sizeof(*clk)" to fix it.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.com>
---
 drivers/clk/keystone/sci-clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c
index 7e1b136e71ae..010a61a2549c 100644
--- a/drivers/clk/keystone/sci-clk.c
+++ b/drivers/clk/keystone/sci-clk.c
@@ -395,7 +395,7 @@ static struct clk_hw *sci_clk_get(struct of_phandle_args *clkspec, void *data)
 	key.clk_id = clkspec->args[1];
 
 	clk = bsearch(&key, provider->clocks, provider->num_clocks,
-		      sizeof(clk), _cmp_sci_clk);
+		      sizeof(*clk), _cmp_sci_clk);
 
 	if (!clk)
 		return ERR_PTR(-ENODEV);
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-10-12  2:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12  2:19 [PATCH sci-clk] Fix application of sizeof to pointer davidcomponentone
2021-10-12  2:19 ` davidcomponentone

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.