Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp700215ybg; Sun, 26 Jul 2020 18:52:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2Iq6vOgpRZzJYCXi7DpTDhlP1VFLuaBSXU0dkpHWhzdVRejsJtVrlaLyou0QZXymWIxqB X-Received: by 2002:a50:fb08:: with SMTP id d8mr7770594edq.79.1595814721853; Sun, 26 Jul 2020 18:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595814721; cv=none; d=google.com; s=arc-20160816; b=L1yHOp+Z9Tht5oX3WDRnfKRGXUIg2mzsJPpf78uR71jEsieXrgRPmimbvKcrw+n0jx jfbxUZOgsFlSZ94R99syjM+1Tm0atXwSCdMMNACzkr3QoDKoFmjeCB+nvn6itcusgP+O 8mLKsQNMjIWuCvr7ykM5+j4hBdW1BXiVoEiM7tWYhhVQfB+RFSBWc+E5Khcib7ma/bnm QrIwVNPioU2xYZWIM7D/hC2qiMEvFnGKkeZimTfo6FzhoJaqgDXPXf834zXJhbbjN1Jt iVWESAN1ueN6LYiVWmFyNK81Y3vGJ1HdEKQjnn8MOBSFQBTYUU/tr9VhdEEwh49o+/VQ qjrA== 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=QPiGh7fuHynpJ8WegBsTZAxc6VOp91s5oCzxSfpg/ds=; b=Oz+YCpQI3wCj40VqBmhyRU/yXOIDIlJTfpmz66X9org/l21+blJTlyZjWDI7q+3KSX FOE2RyuvSeqFnMXfllNx78+Po3dyw+ajBZlF7Trn1JwOiRgaTAYplnG5YTGr6HY2d0Lh B21FYvzkMF+EwqWRal9fjkRoO2RegTKJq+zFvsKXT677N/DZO9fcf9laMyJ79JLoePGg azI9kTCl5tXhL8tIglD5LFuuRMRQCLVYcmvOJItPs7b9/KiC6RuPsmovOltWO+coWHpe sRy2uOgxM2Jzyr0IMI4ESBZCXuq7LlquGvvUUVPuuGV9SD+ypRJhKDevcQSKPFv5UIXa Kdnw== 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 c16si3213654ejx.333.2020.07.26.18.51.40; Sun, 26 Jul 2020 18:52:01 -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 S1727087AbgG0BvM (ORCPT + 99 others); Sun, 26 Jul 2020 21:51:12 -0400 Received: from smtp25.cstnet.cn ([159.226.251.25]:51004 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726797AbgG0BvM (ORCPT ); Sun, 26 Jul 2020 21:51:12 -0400 Received: from localhost (unknown [159.226.5.99]) by APP-05 (Coremail) with SMTP id zQCowAAnxwz_Mh5fgI12Aw--.24702S2; Mon, 27 Jul 2020 09:50:55 +0800 (CST) From: Xu Wang To: mathieu.poirier@linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org, alexander.shishkin@linux.intel.com, linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Xu Wang Subject: [PATCH] coresight: Use devm_kcalloc() in coresight_alloc_conns() Date: Mon, 27 Jul 2020 01:50:54 +0000 Message-Id: <20200727015054.8351-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: zQCowAAnxwz_Mh5fgI12Aw--.24702S2 X-Coremail-Antispam: 1UD129KBjvdXoWrtrW7tw1kZr1xXFW5WF1xZrb_yoW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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 --- drivers/hwtracing/coresight/coresight-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c index e4912abda3aa..d1460b6e4e07 100644 --- a/drivers/hwtracing/coresight/coresight-platform.c +++ b/drivers/hwtracing/coresight/coresight-platform.c @@ -27,7 +27,7 @@ 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 * + pdata->conns = devm_kcalloc(dev, pdata->nr_outport, sizeof(*pdata->conns), GFP_KERNEL); if (!pdata->conns) -- 2.17.1