[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201229135012.23472-1-zhengyongjun3@huawei.com>
Date: Tue, 29 Dec 2020 21:50:12 +0800
From: Zheng Yongjun <zhengyongjun3@...wei.com>
To: <linux-kernel@...r.kernel.org>
CC: <vkoul@...nel.org>, <yung-chuan.liao@...ux.intel.com>,
<pierre-louis.bossart@...ux.intel.com>, <sanyog.r.kale@...el.com>,
"Zheng Yongjun" <zhengyongjun3@...wei.com>
Subject: [PATCH -next] soundwire: intel: Use kzalloc for allocating only one thing
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@...wei.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
Powered by blists - more mailing lists