Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1226977imu; Tue, 20 Nov 2018 13:54:41 -0800 (PST) X-Google-Smtp-Source: AJdET5eSftl3e30fihaCBfFSw22ZTOJ+pVEv+dDGz3bljRRNSV1zExpeGua5CFG02R15dcMa3U8v X-Received: by 2002:a63:ce08:: with SMTP id y8mr3465063pgf.388.1542750881217; Tue, 20 Nov 2018 13:54:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542750881; cv=none; d=google.com; s=arc-20160816; b=f2WaSiYhvotUSGq6nbgvBZu4sycilkjSTR8ydCB2Uv9nKgVzNJKnYc7vRoBq/YKkyD g6lZQDZx7pLtIc2bnj4zHaaQ3iuGg3+U7JA+QouL35PKFP+LdmPsvwJWT66RXNT3RSTs ywwDtFny31WtOt2VYkkocnIjmGxRrSspnVJuZm1aG3D6ktgx24O9HOHN4kUtvZBuX5ZD s0DgxvrQa0MPLtcfmCAUoevItpksbgMVwLA4Us+Qid2u8AhW9JY/h1aajQKmIkyfov9x vX1PJalWLl3O7p7olinRotWWe7l0seJmCHZzda8U0zwxRTEFlL+Z9uWrvYsjaY2hWifx KK/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=UEnpv5rx553fHzcPn6ookDJ2Y+2fbNcLHH1cRiibPDE=; b=tQjKhiubhB4xODXv4uf4kvL4GFkpsbuCMVz0HQH43khfdypknpmyzPa1Ug3CTTxnBM 4hw6hQ93qL1l3usDZitER26PtLwpiL8o2MQJZhFrYRAkDagJ25++xMdhiskmgkRk+fnJ FbXXsPeApa0JIjbUkv9p52bTEyiPLxXCDqIzmPOjUyJcILuBNLCAVReT1KbVmnAIcWn1 Nj4Adlc/ys4+rF8yh07RtO/Rf/vGErFscTUOtG1ppGxSmMQLaH/Nqitc5/u38J8IgD8V lpFXYsQGPyiWhvVaaT1JrGIukC1yv7gO4+wtRdivdbhxalKk2dZ71s9+QGksbcPx6diq uZmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=KiMC24kH; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i23si38256156pgb.116.2018.11.20.13.54.25; Tue, 20 Nov 2018 13:54:41 -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=@broadcom.com header.s=google header.b=KiMC24kH; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726098AbeKUIY4 (ORCPT + 99 others); Wed, 21 Nov 2018 03:24:56 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38311 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725938AbeKUIYz (ORCPT ); Wed, 21 Nov 2018 03:24:55 -0500 Received: by mail-pl1-f196.google.com with SMTP id e5so2241706plb.5 for ; Tue, 20 Nov 2018 13:53:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=UEnpv5rx553fHzcPn6ookDJ2Y+2fbNcLHH1cRiibPDE=; b=KiMC24kHid3MFII1BR2VlK+gNeWQ8bsFHmnLevRJ29HA9lY3E6SNIhMpBxXtf0dCVf 30O0m74Ia+P3Py6s3QWPm/nJH3LcbZNxy4oPmYYP5CwWeq4Q+/CdXzudLUdWmROqOT2k pwWlATsi3ioNRhw2VmvDiUbSsp7vlDgJvC4Lo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=UEnpv5rx553fHzcPn6ookDJ2Y+2fbNcLHH1cRiibPDE=; b=q4hhTueYdYYJc7Mp0ResZiT/QtoHxS3Im1JVkpf36PH3wiW2cMPXwqfK9ilG6qxc/y tB1IF7HhoDNC/3geKWRziG3vLiuCnt/BEEuxzVGVl+WbVO0nwKhKFjGoNr1748a+p5Bh FTRMyVlB/bh63sb1YTloyIACWwhJ+NMBPeW/y7yKrdFNPK+nQXXzOSGxYxvHLab04F/x 5ojDFBHkJU6OCSR0NyEeOVtdmm/sA84AoXC9YpCgUUDk4Xhz6YwtFj3mS6P+WvbqNUSc 6OxLJ8At2XWMabVa7vFrp6hMz6emt8ZmYpn8/EWberpxB7qCo6osMpDie+gkTl+FGBp1 YUtg== X-Gm-Message-State: AGRZ1gKTKiqTGrTExGJj51XW3KstelDa61ew7PdqWIaqKu5udjImSp0s D7shDYeACiE72X1RZgZcVR8Ttg== X-Received: by 2002:a62:cf02:: with SMTP id b2mr4107411pfg.183.1542750818536; Tue, 20 Nov 2018 13:53:38 -0800 (PST) Received: from [10.69.36.116] (igp-prod-emp-gw.vpn.broadcom.com. [192.19.223.250]) by smtp.gmail.com with ESMTPSA id e123sm45110256pgc.58.2018.11.20.13.53.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 13:53:37 -0800 (PST) Subject: Re: [PATCH] scsi/lpfc/lpfc_sli.c: Use dma_zalloc_coherent To: Sabyasachi Gupta , dick.kennedy@broadcom.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: jrdr.linux@gmail.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, brajeswar.linux@gmail.com References: <5bf1797b.1c69fb81.2368c.1ccc@mx.google.com> From: James Smart Message-ID: <80744ca9-8439-814b-5564-95cd4dff2094@broadcom.com> Date: Tue, 20 Nov 2018 13:53:33 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <5bf1797b.1c69fb81.2368c.1ccc@mx.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/18/2018 6:38 AM, Sabyasachi Gupta wrote: > Replaced dma_alloc_coherent + memset with dma_zalloc_coherent > > Signed-off-by: Sabyasachi Gupta > --- > drivers/scsi/lpfc/lpfc_sli.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c > index 783a154..3491ff7 100644 > --- a/drivers/scsi/lpfc/lpfc_sli.c > +++ b/drivers/scsi/lpfc/lpfc_sli.c > @@ -6229,7 +6229,7 @@ lpfc_sli4_ras_dma_alloc(struct lpfc_hba *phba, > goto free_mem; > } > > - dmabuf->virt = dma_alloc_coherent(&phba->pcidev->dev, > + dmabuf->virt = dma_zalloc_coherent(&phba->pcidev->dev, > LPFC_RAS_MAX_ENTRY_SIZE, > &dmabuf->phys, > GFP_KERNEL); > @@ -6240,7 +6240,6 @@ lpfc_sli4_ras_dma_alloc(struct lpfc_hba *phba, > "6187 DMA Alloc Failed FW logging"); > goto free_mem; > } > - memset(dmabuf->virt, 0, LPFC_RAS_MAX_ENTRY_SIZE); > dmabuf->buffer_tag = i; > list_add_tail(&dmabuf->list, &ras_fwlog->fwlog_buff_list); > } Looks fine. -- james Reviewed-by:   James Smart