Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp127220pxk; Tue, 15 Sep 2020 23:17:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwszz7YnPQ0BGjvUao0l1WubMgJjzNfX54Gi04fBabwKH4nCQEjxU6zc6vWnQ8DzWboMRGh X-Received: by 2002:aa7:c554:: with SMTP id s20mr25820957edr.230.1600237040064; Tue, 15 Sep 2020 23:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600237040; cv=none; d=google.com; s=arc-20160816; b=TLvsdv2Gh0JipKA3DbsFPbRo2zrEon25eOM5V667NiIHACAKqP9mCw6sZtll1jXXDY 70PpZyeKeZ1Tdt0FLoARS+Ap6Lm2kYMx+tK61Vq+BIHhfy6JAPhPTLrf4V1+cKr5OYvN qq5BHx2Hm2xu8FCAFvxHyTkOzO7+49gVmPVn54El4DGwAa+0FlEWKuM07RPnh6eOnPhG HMmQ/5U0KnPE7ymPOV/BW2bO3X4WCo02pO2xe67f3hmnHvTlH1Z9XO0bQY1rsR1WenCC qAH8j4U3ygeNNXS3nLE+5hgNCxCjh89364Zbr4idUufbmThR0RIYGfBzXpFvN5A8WwKX I/kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=KjzKHcqIHyTU9GxZzY45xVVx3IoY03bClTsXUditbt8=; b=GtHzBJTwsUk0j1msBPVeBy6fLVRJNX72gjgRoqVJQIFFLoqhYWXEJ1L7wRtTr05vxH YZggNRMRuLbrUCbaeqi+p6FfSKvgdP0wjPZ9cDAdsOvNgJegvR1CitEvUEFVpx4FWi9I Zt8YPNDYax5ejv68zkGTRTOMj11HLcSDv5WuNjZS92Rk3ayog9HpiG+YebAgEp96e0yB gBSn88hz/qCei1hxf/555zR7J8MxzvChGXHQdGv6h07UZIFcwSdI+ao+cPsiJ7MpUV4q 975dBwxlTci/3Sry/LTM23M76bSe7Hpuh1UPHK+cu8CDbzsjv/5K5e9/RurA/5HuvAIT Yf/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si11230887ejx.205.2020.09.15.23.16.56; Tue, 15 Sep 2020 23:17:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726222AbgIPGOt (ORCPT + 99 others); Wed, 16 Sep 2020 02:14:49 -0400 Received: from smtp23.cstnet.cn ([159.226.251.23]:34072 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726128AbgIPGOt (ORCPT ); Wed, 16 Sep 2020 02:14:49 -0400 Received: from localhost (unknown [159.226.5.99]) by APP-03 (Coremail) with SMTP id rQCowADX3Ow9rWFfj71FAg--.32289S2; Wed, 16 Sep 2020 14:14:22 +0800 (CST) From: Xu Wang To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, shengjiu.wang@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, linux-imx@nxp.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Xu Wang Subject: [PATCH] fsl: imx-audmix : Replace seq_printf with seq_puts Date: Wed, 16 Sep 2020 06:14:20 +0000 Message-Id: <20200916061420.10403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v67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCT nIWIevJa73UjIFyTuYvjfUe7KsUUUUU X-Originating-IP: [159.226.5.99] X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiCQUBA102Zk3uuAAAsY Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". Signed-off-by: Xu Wang --- sound/soc/fsl/imx-audmix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c index 202fb8950078..cbdc0a2c09c5 100644 --- a/sound/soc/fsl/imx-audmix.c +++ b/sound/soc/fsl/imx-audmix.c @@ -185,20 +185,20 @@ static int imx_audmix_probe(struct platform_device *pdev) return -ENOMEM; priv->num_dai = 2 * num_dai; - priv->dai = devm_kzalloc(&pdev->dev, priv->num_dai * + priv->dai = devm_kcalloc(&pdev->dev, priv->num_dai, sizeof(struct snd_soc_dai_link), GFP_KERNEL); if (!priv->dai) return -ENOMEM; priv->num_dai_conf = num_dai; - priv->dai_conf = devm_kzalloc(&pdev->dev, priv->num_dai_conf * + priv->dai_conf = devm_kcalloc(&pdev->dev, priv->num_dai_conf, sizeof(struct snd_soc_codec_conf), GFP_KERNEL); if (!priv->dai_conf) return -ENOMEM; priv->num_dapm_routes = 3 * num_dai; - priv->dapm_routes = devm_kzalloc(&pdev->dev, priv->num_dapm_routes * + priv->dapm_routes = devm_kcalloc(&pdev->dev, priv->num_dapm_routes, sizeof(struct snd_soc_dapm_route), GFP_KERNEL); if (!priv->dapm_routes) @@ -208,7 +208,7 @@ static int imx_audmix_probe(struct platform_device *pdev) struct snd_soc_dai_link_component *dlc; /* for CPU/Codec/Platform x 2 */ - dlc = devm_kzalloc(&pdev->dev, 6 * sizeof(*dlc), GFP_KERNEL); + dlc = devm_kcalloc(&pdev->dev, 6, sizeof(*dlc), GFP_KERNEL); if (!dlc) { dev_err(&pdev->dev, "failed to allocate dai_link\n"); return -ENOMEM; -- 2.17.1