From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2BCBC433E1 for ; Thu, 16 Jul 2020 18:00:28 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E2CC20578 for ; Thu, 16 Jul 2020 18:00:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZSJvK/Yc"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jJWP65hl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E2CC20578 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=m8NjQp+sEGqZLqniE0/05LzwWWgbzlgH93Pr3W0hY9M=; b=ZSJvK/YcMaEN/ygPQe4T5g2Ix U152E3cX/B9BWlh1rsmTq8XQazjV/iNEHPOycjoCNEINjHkpHTxUiinlfNr/lmX9vCYhOzQ+pCybh prlvS991IdLMP57t+/aYtNF7ZJ0oJCk5bK+OTfGIn/lxyqt4wrS1U4BYkdSFQAgEjxRyqYhFcF/lr 9Cp3XdTtux8BSRWhzpxGbUfALCg7eXyQFPvIqodVHRMc0UxIUkHMoMj5jrxR2iQp46+JuOeZ2wNhX pmsG1KKF4tfCEWhbng7hfIpQQcuqNsMg2WT8TLzpyrqkCl+BvkPm1dFbuTbKf9b5ZBudt6yN3GfI8 uULwPGBvw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jw89X-0003TG-AI; Thu, 16 Jul 2020 17:58:39 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jw88s-0003DK-Eq for linux-arm-kernel@lists.infradead.org; Thu, 16 Jul 2020 17:58:02 +0000 Received: by mail-pl1-x644.google.com with SMTP id t6so4193103plo.3 for ; Thu, 16 Jul 2020 10:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=L9CsMjiHr19XNd/X0TT3qrgDad5rrN0wvHdrCt2oHdA=; b=jJWP65hlFPfTs9rQWOqearAfdN1sNrBlpughSVbYqkHsj4vwzfvygygpr4pSqWB3CH lzTQDodDlWnfty9XhRg7Sp8j9rsiXayqSnPKY+mu8N7lmGzoIbgUywhl1i2ZIMHI+AG9 GBVtgwK5ZTlzWcr/H4mR5RHpQP+PFYaz9Xr/FGrja6i/6INykft8sz5PdGfGtaieSYsZ UMPy3Zq5x6pOmdtpcdsun12k2Jrs2QkpRSpoFFNgJErELnSl9M2ncMgNR1AAvPGsbPOa v5oNKMffEn2ap3kQ5s4dRgkbEfZJvUKe4tdu6vnRGXJGt03ZozCCVBltWiMwg+e7+/x1 qU3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L9CsMjiHr19XNd/X0TT3qrgDad5rrN0wvHdrCt2oHdA=; b=GYgkJtNYPum2rqQ8I9uFytEDoRop7k1ni6McYPL6gD/m5K35Cl+P7BWxF4cOlKxj9M QiEqAmFDF60zmDGr33jpSfE2rCNIstMx/J3B/t5upLtVzIccxf6pgX4lORTKb7QDKl7C VmYgSmn+48oehVM1W4gHkiwj4Mc9dPElxaq2Gd9PtWr44zP99KBCqTR1pnfrN7tYQQf0 W2a8kXoiQue7eMiR80+4V0vCA6sE6ra02KYgu9KQamZI0UfstbDdOi9VvNX2Dwi0sqAC kOEd/krDITky9kFW17LE0A95LGrm8wm8rUceA0NuOKjQeH6RoTP7jzKirYmmxnWlFRqv uLCw== X-Gm-Message-State: AOAM530uL3JaMqizoE1VTtuXVwFofhOo8oyVzEfrYHZu3nrSXbrMZ14S XEWqYiSkqO94RJfqoExfV3wa/w== X-Google-Smtp-Source: ABdhPJz+HHmjxLLa6Xd3BQg/PX1xr51SKbv6NmefaV1ewMQ7gijpdNvM1k9e23R+sjNjLZq5eHJ1IA== X-Received: by 2002:a17:90b:4ace:: with SMTP id mh14mr6126241pjb.139.1594922276445; Thu, 16 Jul 2020 10:57:56 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id 83sm5473253pfu.60.2020.07.16.10.57.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 10:57:55 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 07/17] coresight: Use devm_kcalloc() in coresight_alloc_conns() Date: Thu, 16 Jul 2020 11:57:36 -0600 Message-Id: <20200716175746.3338735-8-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200716175746.3338735-1-mathieu.poirier@linaro.org> References: <20200716175746.3338735-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200716_135758_669793_B7EFB993 X-CRM114-Status: GOOD ( 10.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: saiprakash.ranjan@codeaurora.org, suzuki.poulose@arm.com, vulab@iscas.ac.cn, tingwei@codeaurora.org, andriy.shevchenko@linux.intel.com, linux-arm-kernel@lists.infradead.org, mike.leach@linaro.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Xu Wang 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 Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-platform.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c index e4912abda3aa..bfd44231d7ad 100644 --- a/drivers/hwtracing/coresight/coresight-platform.c +++ b/drivers/hwtracing/coresight/coresight-platform.c @@ -27,9 +27,8 @@ static int coresight_alloc_conns(struct device *dev, struct coresight_platform_data *pdata) { if (pdata->nr_outport) { - pdata->conns = devm_kzalloc(dev, pdata->nr_outport * - sizeof(*pdata->conns), - GFP_KERNEL); + pdata->conns = devm_kcalloc(dev, pdata->nr_outport, + sizeof(*pdata->conns), GFP_KERNEL); if (!pdata->conns) return -ENOMEM; } -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel