From patchwork Wed Jan 21 10:03:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Medve X-Patchwork-Id: 431412 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C339E1402A5 for ; Wed, 21 Jan 2015 21:21:51 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 8C6061A16BC for ; Wed, 21 Jan 2015 21:21:51 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org X-Greylist: delayed 86633 seconds by postgrey-1.35 at bilbo; Wed, 21 Jan 2015 21:17:22 AEDT Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0143.outbound.protection.outlook.com [65.55.169.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 701E01A0DA5 for ; Wed, 21 Jan 2015 21:17:22 +1100 (AEDT) Received: from BN3PR0301CA0016.namprd03.prod.outlook.com (25.160.180.154) by BLUPR03MB567.namprd03.prod.outlook.com (10.141.78.20) with Microsoft SMTP Server (TLS) id 15.1.59.20; Wed, 21 Jan 2015 10:17:14 +0000 Received: from BL2FFO11FD005.protection.gbl (2a01:111:f400:7c09::148) by BN3PR0301CA0016.outlook.office365.com (2a01:111:e400:4000::26) with Microsoft SMTP Server (TLS) id 15.1.59.20 via Frontend Transport; Wed, 21 Jan 2015 10:17:14 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD005.mail.protection.outlook.com (10.173.161.1) with Microsoft SMTP Server (TLS) id 15.1.75.11 via Frontend Transport; Wed, 21 Jan 2015 10:17:14 +0000 Received: from lazy.am.freescale.net (lazy.am.freescale.net [10.81.116.101]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t0LAHD1L012714; Wed, 21 Jan 2015 03:17:13 -0700 From: Emil Medve To: , , , , Subject: [PATCH v2 02/10] clk: qoriq: Fix checkpatch type ALLOC_WITH_MULTIPLY Date: Wed, 21 Jan 2015 04:03:24 -0600 Message-ID: <1421834611-9656-3-git-send-email-Emilian.Medve@Freescale.com> X-Mailer: git-send-email 2.2.1 In-Reply-To: <1421834611-9656-1-git-send-email-Emilian.Medve@Freescale.com> References: <1421834611-9656-1-git-send-email-Emilian.Medve@Freescale.com> X-EOPAttributedMessage: 0 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=Emilian.Medve@freescale.com; X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(2950100001)(62966003)(77156002)(97736003)(36756003)(46102003)(77096005)(68736005)(2201001)(92566002)(47776003)(64706001)(86362001)(104016003)(85426001)(50226001)(106466001)(105606002)(76176999)(229853001)(50466002)(50986999)(48376002)(6806004)(19580395003)(19580405001)(87936001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB567; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-DmarcAction-Test: None X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(3005004);SRVR:BLUPR03MB567; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BLUPR03MB567; X-Forefront-PRVS: 04631F8F77 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB567; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2015 10:17:14.3185 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB567 Cc: Emil Medve X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" WARNING:ALLOC_WITH_MULTIPLY: Prefer kcalloc over kzalloc with multiply + subclks = kzalloc(sizeof(struct clk *) * count, GFP_KERNEL); Signed-off-by: Emil Medve --- drivers/clk/clk-qoriq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c index 90ff685..475ce1c 100644 --- a/drivers/clk/clk-qoriq.c +++ b/drivers/clk/clk-qoriq.c @@ -85,7 +85,7 @@ static void __init core_mux_init(struct device_node *np) pr_err("%s: get clock count error\n", np->name); return; } - parent_names = kzalloc((sizeof(char *) * count), GFP_KERNEL); + parent_names = kcalloc(count, sizeof(char *), GFP_KERNEL); if (!parent_names) { pr_err("%s: could not allocate parent_names\n", __func__); return; @@ -192,7 +192,7 @@ static void __init core_pll_init(struct device_node *np) goto err_map; } - subclks = kzalloc(sizeof(struct clk *) * count, GFP_KERNEL); + subclks = kcalloc(count, sizeof(struct clk *), GFP_KERNEL); if (!subclks) { pr_err("%s: could not allocate subclks\n", __func__); goto err_map;