All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] clk: tegra: Use kzalloc for allocating only one thing
@ 2020-12-29 13:52 Zheng Yongjun
  0 siblings, 0 replies; only message in thread
From: Zheng Yongjun @ 2020-12-29 13:52 UTC (permalink / raw)
  To: mturquette, sboyd, linux-clk, linux-tegra, linux-kernel
  Cc: pdeschrijver, pgaikwad, thierry.reding, jonathanh, Zheng Yongjun

Use kzalloc rather than kcalloc(1,...)

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/clk/tegra/clk-tegra124-emc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/tegra/clk-tegra124-emc.c b/drivers/clk/tegra/clk-tegra124-emc.c
index 745f9faa98d8..7cc89c234eaa 100644
--- a/drivers/clk/tegra/clk-tegra124-emc.c
+++ b/drivers/clk/tegra/clk-tegra124-emc.c
@@ -483,7 +483,7 @@ struct clk *tegra_clk_register_emc(void __iomem *base, struct device_node *np,
 	struct clk *clk;
 	int err;
 
-	tegra = kcalloc(1, sizeof(*tegra), GFP_KERNEL);
+	tegra = kzalloc(sizeof(*tegra), GFP_KERNEL);
 	if (!tegra)
 		return ERR_PTR(-ENOMEM);
 
-- 
2.22.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-29 13:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29 13:52 [PATCH -next] clk: tegra: Use kzalloc for allocating only one thing Zheng Yongjun

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.