Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp609137imm; Fri, 21 Sep 2018 05:33:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ0hxfSTu5Qios2QCLZGkUSOchtOrkkr7d2IoWkO/QwbS7ciM9sOyiY8mmZMkgUiYUsCFvU X-Received: by 2002:a17:902:585:: with SMTP id f5-v6mr44288323plf.7.1537533206296; Fri, 21 Sep 2018 05:33:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537533206; cv=none; d=google.com; s=arc-20160816; b=xwPgyAPX3dtOYdojFr0hHjwIYzQWVyXUw6ZVgoo6NG7lvpXgeNtd4ehsvLlRyekIky H7YAhbzO+atdszgCPNeJEXe4tZevAxP9uycEmpEAua1HJAzs69yLkwPynlRyJdLbXx1m H60Trw1Gai5sCfQDD0N4muUgGLEtrtR7phZGEzt2GEVbuXM4AXXojoin8+8jaVmszEvQ wV31I/oYmb8xijqhldebyF6gleKLPFU/daz/WVNLLAmaXuGO9w8u1PKkC0tsNa58F2QG 5qZsG0YjG/nt86M9qJ1zHAvLTVUhfGYuhUqPDWkrot8EmS6+wR05RXvxqvT2gsKQgr+I 1sPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=c/5qg6WGX/FV6/WwYLh+UVcKOc/8CdnmzRN0xg0fscs=; b=No3sjPwILhRvQBpZeFUqabXMw2r9agyOOdEccWl9DF7f9QL6mvLt/00IDXXiZhxygE YhkTbsrCRhAGybja3OL46Y//NlYVLQ3IaFECuAFYuPVmXngW+eWt6Doj7a1CLdS7DxKR 8LlRYdnvEHxoDHa4nYAdP7FI02Z71tdQW+97iK+K+hKkW6HGQW93Gvw83/X16rlnXZ9K C/kCad3GlUBp7j1BTJ6GLaL/5jlInkEhoCGJFHj+O0cvPBwzdvAhaubn32LI2e/rUCBM W8+HqIjM9ryQVTQlnZqQbeO3UTojEn8pMt7Eyf5SnoTTsK8/CjGafLBBD9t2c777V8bS VhzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i33-v6si28266900pld.306.2018.09.21.05.33.10; Fri, 21 Sep 2018 05:33:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389264AbeIUSVX (ORCPT + 99 others); Fri, 21 Sep 2018 14:21:23 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13095 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725898AbeIUSVX (ORCPT ); Fri, 21 Sep 2018 14:21:23 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9D3A4948F8BA5; Fri, 21 Sep 2018 20:32:35 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.399.0; Fri, 21 Sep 2018 20:32:32 +0800 From: zhong jiang To: , CC: , Subject: [PATCH] drivers/firmware: Should be a struct size instead of a pointer. Date: Fri, 21 Sep 2018 20:20:09 +0800 Message-ID: <1537532409-43532-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kcalloc should be sizeof(*cpu_groups) instead of sizeof(cpu_groups). Signed-off-by: zhong jiang --- drivers/firmware/psci_checker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/psci_checker.c b/drivers/firmware/psci_checker.c index 3469436..26afabc 100644 --- a/drivers/firmware/psci_checker.c +++ b/drivers/firmware/psci_checker.c @@ -162,7 +162,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) return -ENOMEM; -- 1.7.12.4