mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Smart <james.smart@broadcom.com>
To: Sabyasachi Gupta <sabyasachi.linux@gmail.com>,
	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
Subject: Re: [PATCH] scsi/lpfc/lpfc_sli.c: Use dma_zalloc_coherent
Date: Tue, 20 Nov 2018 13:53:33 -0800	[thread overview]
Message-ID: <80744ca9-8439-814b-5564-95cd4dff2094@broadcom.com> (raw)
In-Reply-To: <5bf1797b.1c69fb81.2368c.1ccc@mx.google.com>

On 11/18/2018 6:38 AM, Sabyasachi Gupta wrote:
> Replaced dma_alloc_coherent + memset with dma_zalloc_coherent
>
> Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
> ---
>   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   <jsmart2021@gmail.com>


  parent reply	other threads:[~2018-11-20 21:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-18 14:38 Sabyasachi Gupta
2018-11-20  9:40 ` John Garry
2018-11-20 21:52   ` James Smart
2018-11-21  7:56     ` John Garry
2018-11-20 21:53 ` James Smart [this message]
2018-11-22  3:32 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80744ca9-8439-814b-5564-95cd4dff2094@broadcom.com \
    --to=james.smart@broadcom.com \
    --cc=brajeswar.linux@gmail.com \
    --cc=dick.kennedy@broadcom.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sabyasachi.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®