Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5547097imu; Tue, 13 Nov 2018 08:10:33 -0800 (PST) X-Google-Smtp-Source: AJdET5dVzTW7E5h+THx3qtSFWAimzDZs9Dz2LZ0mcKyvaf0n731ZjqozDJBaYpMy4fkvkG9SfE2n X-Received: by 2002:a62:29c4:: with SMTP id p187-v6mr5725113pfp.62.1542125433127; Tue, 13 Nov 2018 08:10:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542125433; cv=none; d=google.com; s=arc-20160816; b=G0ag0JFxGAIAYrAPO9Fqk/n6yd5xEpLqZPcGPA1sqaT5I3Pm6eChKeAF9XuXip53Ai GpgAuYfr3efvybzyLDg52WK/QRziFZEGHFrpaW1Yri2WCCmm83BU/z8CUseNqvxaAY0Q oADMncrs5n8zkNjvWP2619Caab+AbovgFgoXUUeIT0cQDteWafNQVu3UHXHjgML8E5BP kIs0a/G5Ld327m605W2PAC5Hb3c88vcOxGFJ93IGr9iend65JKNfBU4zO0vwBL5y98QX HCvGtJc5F5KxIW5SYeuJTBWjCNH0hsZaJHdXJS5OjSpILgrulZ5IplQ5O1Itf02wjHBJ Mj6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=MjgWDcycwUYJ7xw3Zc08pk27UC03bcmNgm1wCjb0p0w=; b=a05xA8MYbDfN8psKdHkCT2ogk75rllcCkBfTLmYAafLirlMZoHcXwCc/0MlJt37Jk6 0TT69H17+9ghnpEZP/Cl8mG+oGEZb3zsDxDkdZLPkehRPHRNRHZ0JJQmswMGdgWVSu+I +/by4FVuxX/XbXoCLo0e2615nYDhXYHAVFmI3If18vs8IdhVFbFu/57Aha8ACXVE7Jh9 wXqRp1vXjJL8TEaREG0FthNZCAoW1hIG0QkJghjqFx1Zm+sKCTxcSDMpcW9G87e+AvQU 6N+w3Un88Yo5VaT5sVYHNGu6eABHXEZMqyuAxrdvWzr2zgNGuv1GHasodPyHanzXczhK i72A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ab3qVvAv; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si14920185pgf.450.2018.11.13.08.09.51; Tue, 13 Nov 2018 08:10:33 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ab3qVvAv; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388277AbeKNCDy (ORCPT + 99 others); Tue, 13 Nov 2018 21:03:54 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:32871 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731439AbeKNCDy (ORCPT ); Tue, 13 Nov 2018 21:03:54 -0500 Received: by mail-pl1-f194.google.com with SMTP id w22-v6so6243195plk.0; Tue, 13 Nov 2018 08:05:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=MjgWDcycwUYJ7xw3Zc08pk27UC03bcmNgm1wCjb0p0w=; b=Ab3qVvAvS95tsC8ROD7avvpH7417DxztpEbHLr9BLxMo0E7/G7tNxT0iCleSgaPya7 gK/aj+Qsaqw/xpsJIQ3fxUoeEO1F93ErhRUMZVPECzvGCntg21iYAA2maYU5vwccKCCa CU169IoO/nhDA9nie5Jk5085bNfu78DIJnq7tL9wHa1T7aho+iIvN62lBcXC1SEn2xG7 hqVeFl21SiHpkhZJuXaUIA5PCamJq2Pkl2aEqUmJZx8uIjQ4NhDygd4My7mIO9bzXgNQ x0UUqTHelaF08T9VyO4RdsKkj4muueejD5GURNlwHnWugOL8VgKulk5MvDa+fQVHJ6Zu weCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=MjgWDcycwUYJ7xw3Zc08pk27UC03bcmNgm1wCjb0p0w=; b=HwNrnFpN2TA1SaatnX06y0eUBnDNiSIVtPbfLXHVDj0JXOF9n/wOxZMwuZbX7y0GSL gvs0tzMUPRwa7rtCKEuRn5bbzmQ7+pQrxL2gU5f7mL8HDK7LozkN6qOc6l97goQRxjFL zXBCq4kY9O8OvnYosjqvqZa5LtrHCF1Empg5XEUmaqNue4yKtX4Gx0h3yJ5GYaqaBzyh JTGAiMLYAKK/PuutRpY5riVv8KLpjJeXGYyeFNi3uWb+btOCU3mEQN+r/fO68auDov7I L8uO1I3cWlfm44zW/P1NGKZ51Y+2AlPLTmijEMRRE9ZpGthG4cAgCqqLdYvLOaeXL2jc TeBQ== X-Gm-Message-State: AGRZ1gIx8H0CUt5EcIseFKLu9TJtxY7didEpgNPArIS0c7sW7SnGED/3 WkuzAH0HI88Bak5YSGob4hq7aggU30jFN22znUE= X-Received: by 2002:a17:902:7442:: with SMTP id e2mr5605381plt.67.1542125111136; Tue, 13 Nov 2018 08:05:11 -0800 (PST) MIME-Version: 1.0 References: <5beae8ff.1c69fb81.bd59a.b7fa@mx.google.com> <13d3418f-49d1-d683-48a6-cedbc073d86f@suse.de> In-Reply-To: <13d3418f-49d1-d683-48a6-cedbc073d86f@suse.de> From: Sabyasachi Gupta Date: Tue, 13 Nov 2018 21:34:59 +0530 Message-ID: Subject: Re: [PATCH] drivers/scsi/fnic/fnic_trace.c: Use vzalloc To: jthumshirn@suse.de Cc: john.garry@huawei.com, satishkh@cisco.com, sebaddel@cisco.com, kartilak@cisco.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, Souptick Joarder , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Brajeswar Ghosh Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 13, 2018 at 9:23 PM Johannes Thumshirn wro= te: > > On 13/11/2018 16:44, John Garry wrote: > > On 13/11/2018 15:08, Sabyasachi Gupta wrote: > >> Replaced vmalloc + memset with vzalloc > >> > >> Signed-off-by: Sabyasachi Gupta > >> --- > >> drivers/scsi/fnic/fnic_trace.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/scsi/fnic/fnic_trace.c > >> b/drivers/scsi/fnic/fnic_trace.c > >> index 8271785..129ab27 100644 > >> --- a/drivers/scsi/fnic/fnic_trace.c > >> +++ b/drivers/scsi/fnic/fnic_trace.c > >> @@ -468,14 +468,14 @@ int fnic_trace_buf_init(void) > >> fnic_max_trace_entries =3D (trace_max_pages * PAGE_SIZE)/ > >> FNIC_ENTRY_SIZE_BYTES; > >> > >> - fnic_trace_buf_p =3D (unsigned long)vmalloc((trace_max_pages * > >> PAGE_SIZE)); > >> + fnic_trace_buf_p =3D (unsigned long)vzalloc((trace_max_pages * > >> + PAGE_SIZE)); > > > > If you remove the extra brackets in vzalloc() argument then you may not > > spill onto the next line. > > And remove the unnecessary cast. vzalloc() (just like vmalloc()) returns > a void*, so no reason to cast it. > > -- > Johannes Thumshirn SUSE Labs > jthumshirn@suse.de +49 911 74053 689 > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg > GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Norton > HRB 21284 (AG N=C3=BCrnberg) > Key fingerprint =3D EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850 I will remove it and send v2