Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3231807imu; Sat, 24 Nov 2018 00:40:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/XQFEUZz22+zUuOATft0XprFy2E4oMUOI1m3MxmZgVP71jtdrF1JNAqdKw3e4fIcjw1HtUm X-Received: by 2002:a63:d047:: with SMTP id s7mr17021012pgi.311.1543048807408; Sat, 24 Nov 2018 00:40:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543048807; cv=none; d=google.com; s=arc-20160816; b=TicTkoB0z8KvVLnPhvfKuWjJEBwg7EKoT0ODjferluRIqN6e318rwNK7AHcG0MpWol vdIlRhGrzqYHTJlmELkvThiU/nrhrIZmOjc46OQFkzT4pPCj7fdWn5j+KmkuCrHOlVui Q2PPaRKB/BTeV0LVtDP/NzkSNcmDyDoWBG9UViaDH3/AKJ3Vf7hibyQaujyTDkItZ8Ei +0RQokPHc533XgYzIX8gYwqeGvHEBraW6I+RpuU95vpbvQwYwqFdr1nLgOe25MOPhmy4 jbUlIgNJSxOUxIO1ROyHLN8emaS1vWsQzI6XsjI7ebu0JXzptJOt4NOMaUR8Wvb1lGUF 22Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ZrG3IHL1GWTOlWtyEQam/Zgt7Aw27TgBC3WAsY4Di8E=; b=GkOTuSmcsku0zHcxzzOlsiUhx1KcuSIzdkkT1nGKrpONHm1Guyio9I5P80iO6SFgbW 1rxePkbQkH2Obqci0TgvuKYBV+G5SRjBYqKYWvtYaqgGlMClIHN2giDewLfPgk/eFIRd BaJPceMaHHGJG5Z+JJGqBhsMO8fCX5qEjoPL+0MjEyxknxCBC/mDLDQ5M2gsAkyhb9N7 10SefLyJplkd0bXl5UfRl1aioZbydkdvWGDKQyrcvaXRvANwYz5U3CPvo4lY5C/7p6Kq t7z8uvI0DJ86/IDW4eBA2cP92teTOcYCK753GR6PgzwRcr7ukyS7IlijnG1e+UWHiRJo luwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AkptRutt; 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 u22si53506518pgk.335.2018.11.24.00.39.53; Sat, 24 Nov 2018 00:40:07 -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=AkptRutt; 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 S2440132AbeKXB2S (ORCPT + 99 others); Fri, 23 Nov 2018 20:28:18 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:38515 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731421AbeKXB2S (ORCPT ); Fri, 23 Nov 2018 20:28:18 -0500 Received: by mail-pg1-f195.google.com with SMTP id g189so3178351pgc.5; Fri, 23 Nov 2018 06:43:52 -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; bh=ZrG3IHL1GWTOlWtyEQam/Zgt7Aw27TgBC3WAsY4Di8E=; b=AkptRuttt9YcXWJPm4RVwW4OVDTKtHtJqY/V4RC/IWIMCmOFI8WxX2MTQPnflTqWfG XJhVOikbMB4F38jVSDKmDM+THxcOzDfHQquYLW5Uj8Q/dbXavGMcQkEQbW689/xr2R2C LDZj6rgIHzz2rTNthYb/gnaMs6yhreQq3smTaoVjsRRWzeICZQvyhkDUX+JNYg+Zo67W s866ELuxHxuoK5dE7uDRIWgja1FaAJh6UGaKYAw/adTM/dHH9vgVumoUY7EPp/DUeeV7 yuaXIvBWsZqtti4HrixPyBtk0WkXgEDvjNPMYx643TCTSjfloC+ihVC8cBnZGpeg+HkK bFtA== 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; bh=ZrG3IHL1GWTOlWtyEQam/Zgt7Aw27TgBC3WAsY4Di8E=; b=nUxMbf52UUxbM6goc0QMrYTcybkIJRm/24V3WHlJ2RPCdn9RFKnHfF7FdFHpqP/gsT QsB0mYb+ehH0R1QXrRatiiGaljLa63WK/EdRjsqBtS/somPcuzyebZXmGbpG92d6Hpv6 SS93GX5XfMlpDQNDGpmUqCjcCzl/HjOW0jdpjxG+0uLAxwWrCfabQUiQt5lAmdQYziKd Y2XNOxxCo0ox3oQ9ZVqdHSi9h9gasYVzbJOs97A1NZIaWgEVEpjViOIutrTNvyNbJsOt 2EB2A4zsWyack8ckpsHk+CuqzEcqk2F7IGQwHJluc5ODq+dfPss8jnRnLbkm2pxBMXqi gFeA== X-Gm-Message-State: AA+aEWYF1MRBlocaZwNBGutrM6k2Byh9flXQpitldDYZJLn5JpX6vG9d n1m7ukXI/KKhu94Gh5JANvhrVY2Y2GO/ZgKFoIc= X-Received: by 2002:a63:e516:: with SMTP id r22mr14589727pgh.256.1542984231775; Fri, 23 Nov 2018 06:43:51 -0800 (PST) MIME-Version: 1.0 References: <5bec5342.1c69fb81.b02fa.ace9@mx.google.com> In-Reply-To: <5bec5342.1c69fb81.b02fa.ace9@mx.google.com> From: Sabyasachi Gupta Date: Fri, 23 Nov 2018 20:13:40 +0530 Message-ID: Subject: Re: [PATCH v2] drivers/scsi/fnic/fnic_trace.c: Use vzalloc To: satishkh@cisco.com, sebaddel@cisco.com, kartilak@cisco.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: Souptick Joarder , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Brajeswar Ghosh Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 14, 2018 at 10:24 PM Sabyasachi Gupta wrote: > > Replaced vmalloc + memset with vzalloc > > Signed-off-by: Sabyasachi Gupta Any comment on this patch? > --- > v2: Removed additional braces > > drivers/scsi/fnic/fnic_trace.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c > index 8271785..bf0fd2a 100644 > --- a/drivers/scsi/fnic/fnic_trace.c > +++ b/drivers/scsi/fnic/fnic_trace.c > @@ -468,14 +468,13 @@ int fnic_trace_buf_init(void) > fnic_max_trace_entries = (trace_max_pages * PAGE_SIZE)/ > FNIC_ENTRY_SIZE_BYTES; > > - fnic_trace_buf_p = (unsigned long)vmalloc((trace_max_pages * PAGE_SIZE)); > + fnic_trace_buf_p = (unsigned long)vzalloc(trace_max_pages * PAGE_SIZE); > if (!fnic_trace_buf_p) { > printk(KERN_ERR PFX "Failed to allocate memory " > "for fnic_trace_buf_p\n"); > err = -ENOMEM; > goto err_fnic_trace_buf_init; > } > - memset((void *)fnic_trace_buf_p, 0, (trace_max_pages * PAGE_SIZE)); > > fnic_trace_entries.page_offset = > vmalloc(array_size(fnic_max_trace_entries, > -- > 2.7.4 >