Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp465172imu; Tue, 20 Nov 2018 01:58:49 -0800 (PST) X-Google-Smtp-Source: AJdET5f6nX/gBym4fsQUr0HONUvxDdgfdgZkrnM/0JEosP4Slt/0gOUX/FSGs7vttw3oh3Ysiy8j X-Received: by 2002:a62:6801:: with SMTP id d1-v6mr1484125pfc.7.1542707929716; Tue, 20 Nov 2018 01:58:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542707929; cv=none; d=google.com; s=arc-20160816; b=s5iIkZno7Txiy7I53frRPyrmBFX49ZvaBxfeQB4tFXqY/zQt/tivBnvedVs1N3r9s0 NoXwPhsasl7EFgxkhnotVXalUkkS2rBY0/w/EEFcbcttbWSWf/30DJPJfZLfroq9MGbl Fdc5igrvesqkgrF0nqejwpWQwFPq5uMN8uXldmtnpB+GlcuTW9IW0An2RpW5PuYFVMP2 FqAbMuZKPTSr1Hv9/FZdwQ/p0QJ6dzPULuTZyEYuFOtRjRx0I/SK3LY+0SSCcJ+oTVwY kQghJR8sMSbxk1pH2of+FNG8UX56KevXyUP1PANlGuJpncMo1FmMhk8Q0LPcUP0JrYyj lyjg== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=Euvw3ZTlNLLGHeQobsNGBeRzpvgJdGFvHS/u3XxyzoY=; b=qhV+hD+mtAshiZVjEmTP6DpzV91tzhf1yD9fTd6vrWmLwXYBM+ty1ztAPq3iYOasO/ w6nYKEXImRXEg1EyQsKqk4q0vnRIYW4Fw2AV0QMzFdnUFXsypy0VoLtYJXEODqgPhNSh p7jjLRtfYr9mFd53OqoYJ334afwCmgx11EnwQ4w9NCguDJYtQG9XO4+ALcVmUNk5wK/b GIXI6RigMMLBbWzMe9kLugiuAHGftoBTZH/IHdI2zV1R9ZR576GdvR4xAVtFleVN0LuG bMj5rIZ/mQ8OF0mdV4diFd/uc4AN9vbY6RD8IT8IGfvXm3J+LTmm3MBDzq9EmBbWSPJE /v6w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2-v6si46671840pla.223.2018.11.20.01.58.34; Tue, 20 Nov 2018 01:58:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726346AbeKTUJX (ORCPT + 99 others); Tue, 20 Nov 2018 15:09:23 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:40355 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725876AbeKTUJX (ORCPT ); Tue, 20 Nov 2018 15:09:23 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 28805A677FE23; Tue, 20 Nov 2018 17:41:07 +0800 (CST) Received: from [127.0.0.1] (10.202.226.41) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Tue, 20 Nov 2018 17:41:02 +0800 Subject: Re: [PATCH] scsi/lpfc/lpfc_sli.c: Use dma_zalloc_coherent To: Sabyasachi Gupta , , , , References: <5bf1797b.1c69fb81.2368c.1ccc@mx.google.com> CC: , , , From: John Garry Message-ID: <16c3b882-6e0e-b712-b4d6-78f68172da65@huawei.com> Date: Tue, 20 Nov 2018 09:40:56 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <5bf1797b.1c69fb81.2368c.1ccc@mx.google.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.41] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/11/2018 14:38, 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, please ensure that you maintain alignment with opening brackets > &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); > } >