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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 279A3C4338F for ; Tue, 24 Aug 2021 10:58:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0840661220 for ; Tue, 24 Aug 2021 10:58:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236448AbhHXK7S (ORCPT ); Tue, 24 Aug 2021 06:59:18 -0400 Received: from foss.arm.com ([217.140.110.172]:34006 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236377AbhHXK7O (ORCPT ); Tue, 24 Aug 2021 06:59:14 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E98931476; Tue, 24 Aug 2021 03:58:28 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.90.204]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 16BDD3F66F; Tue, 24 Aug 2021 03:58:26 -0700 (PDT) Date: Tue, 24 Aug 2021 11:58:24 +0100 From: Mark Rutland To: jing yangyang , Lorenzo Pieralisi Cc: Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, jing yangyang , Zeal Robot Subject: Re: [PATCH linux-next] firmware/psci: fix application of sizeof to pointer Message-ID: <20210824105824.GC96738@C02TD0UTHF1T.local> References: <61d3cc7e5cd4a819381fcb22e1853d6f48a0c927.1629212319.git.jing.yangyang@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <61d3cc7e5cd4a819381fcb22e1853d6f48a0c927.1629212319.git.jing.yangyang@zte.com.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 19, 2021 at 07:30:16PM -0700, jing yangyang wrote: > sizeof when applied to a pointer typed expression gives the size of > the pointer. > > ./drivers/firmware/psci/psci_checker.c:158:41-47: ERROR application of sizeof to pointer > > This issue was detected with the help of Coccinelle. > > Reported-by: Zeal Robot > Signed-off-by: jing yangyang >From looking at the git history, we should add: Fixes: 7401056de5f8d4ea ("drivers/firmware: psci_checker: stash and use topology_core_cpumask for hotplug tests)" With that: Acked-by: Mark Rutland Lorenzo, how do we normally direct these patches? Thanks, Mark. > --- > drivers/firmware/psci/psci_checker.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/firmware/psci/psci_checker.c b/drivers/firmware/psci/psci_checker.c > index 9a369a2..116eb46 100644 > --- a/drivers/firmware/psci/psci_checker.c > +++ b/drivers/firmware/psci/psci_checker.c > @@ -155,7 +155,7 @@ static int alloc_init_cpu_groups(cpumask_var_t **pcpu_groups) > if (!alloc_cpumask_var(&tmp, GFP_KERNEL)) > return -ENOMEM; > > - cpu_groups = kcalloc(nb_available_cpus, sizeof(cpu_groups), > + cpu_groups = kcalloc(nb_available_cpus, sizeof(*cpu_groups), > GFP_KERNEL); > if (!cpu_groups) { > free_cpumask_var(tmp); > -- > 1.8.3.1 > >