* [PATCH -next] soundwire: intel: Use kzalloc for allocating only one thing
@ 2020-12-29 13:50 Zheng Yongjun
2021-01-06 6:00 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-29 13:50 UTC (permalink / raw)
To: linux-kernel
Cc: vkoul, yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale,
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/soundwire/intel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 6a1e862b16c3..5cef271079be 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -967,7 +967,7 @@ static int intel_hw_params(struct snd_pcm_substream *substream,
}
/* Port configuration */
- pconfig = kcalloc(1, sizeof(*pconfig), GFP_KERNEL);
+ pconfig = kzalloc(sizeof(*pconfig), GFP_KERNEL);
if (!pconfig) {
ret = -ENOMEM;
goto error;
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] soundwire: intel: Use kzalloc for allocating only one thing
2020-12-29 13:50 [PATCH -next] soundwire: intel: Use kzalloc for allocating only one thing Zheng Yongjun
@ 2021-01-06 6:00 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2021-01-06 6:00 UTC (permalink / raw)
To: Zheng Yongjun
Cc: linux-kernel, yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale
On 29-12-20, 21:50, Zheng Yongjun wrote:
> 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>
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-06 6:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29 13:50 [PATCH -next] soundwire: intel: Use kzalloc for allocating only one thing Zheng Yongjun
2021-01-06 6:00 ` Vinod Koul
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.