From patchwork Tue Jan 20 10:09: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: 430957 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CA01D1402D7 for ; Tue, 20 Jan 2015 21:16:33 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id B13EF1A2223 for ; Tue, 20 Jan 2015 21:16:33 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0108.outbound.protection.outlook.com [207.46.100.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 7AF541A06DC for ; Tue, 20 Jan 2015 21:13:25 +1100 (AEDT) Received: from CO2PR03CA0023.namprd03.prod.outlook.com (10.141.194.150) by BN1PR0301MB0721.namprd03.prod.outlook.com (25.160.78.140) with Microsoft SMTP Server (TLS) id 15.1.59.20; Tue, 20 Jan 2015 10:13:18 +0000 Received: from BN1AFFO11FD050.protection.gbl (2a01:111:f400:7c10::164) by CO2PR03CA0023.outlook.office365.com (2a01:111:e400:1414::22) with Microsoft SMTP Server (TLS) id 15.1.59.20 via Frontend Transport; Tue, 20 Jan 2015 10:13:18 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD050.mail.protection.outlook.com (10.58.53.65) with Microsoft SMTP Server (TLS) id 15.1.49.13 via Frontend Transport; Tue, 20 Jan 2015 10:13:17 +0000 Received: from right.am.freescale.net (right.am.freescale.net [10.81.116.70]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t0KADDn8011345; Tue, 20 Jan 2015 03:13:16 -0700 From: Emil Medve To: , , , , Subject: [PATCH 2/8] clk: ppc-corenet: Fix checkpatch type ALLOC_WITH_MULTIPLY Date: Tue, 20 Jan 2015 04:09:24 -0600 Message-ID: <1421748570-14282-3-git-send-email-Emilian.Medve@Freescale.com> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1421748570-14282-1-git-send-email-Emilian.Medve@Freescale.com> References: <1421748570-14282-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.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=Emilian.Medve@freescale.com; X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(86362001)(50226001)(105606002)(69596002)(2950100001)(68736005)(76176999)(97736003)(50986999)(77096005)(229853001)(87936001)(48376002)(50466002)(6806004)(19580395003)(46102003)(47776003)(104016003)(62966003)(92566002)(77156002)(36756003)(19580405001)(2201001)(81156004)(106466001)(64706001)(85426001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR0301MB0721; H:az84smr01.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:BN1PR0301MB0721; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BN1PR0301MB0721; X-Forefront-PRVS: 0462918D61 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:BN1PR0301MB0721; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2015 10:13:17.6543 (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.158.2] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0721 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-ppc-corenet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk-ppc-corenet.c b/drivers/clk/clk-ppc-corenet.c index 7cb8f23..efa74aa 100644 --- a/drivers/clk/clk-ppc-corenet.c +++ b/drivers/clk/clk-ppc-corenet.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; @@ -184,7 +184,7 @@ static void __init core_pll_init(struct device_node *np) /* output clock number per PLL */ clocks_per_pll = count; - 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;