[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3b03d6f8-fa69-e8ec-98ca-7a0319afe0dd@oracle.com>
Date: Tue, 18 May 2021 10:52:51 -0500
From: Himanshu Madhani <himanshu.madhani@...cle.com>
To: Yang Yingliang <yangyingliang@...wei.com>,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org
Cc: martin.petersen@...cle.com, skashyap@...vell.com
Subject: Re: [PATCH -next] scsi: qedf: use vzalloc() instead of
vmalloc()/memset(0)
On 5/18/21 8:20 AM, Yang Yingliang wrote:
> Use vzalloc() instead of vmalloc() and memset(0) to simpify
> the code.
>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
> drivers/scsi/qedf/qedf_dbg.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/qedf/qedf_dbg.c b/drivers/scsi/qedf/qedf_dbg.c
> index e0387e495261..0d2aed82882a 100644
> --- a/drivers/scsi/qedf/qedf_dbg.c
> +++ b/drivers/scsi/qedf/qedf_dbg.c
> @@ -106,11 +106,10 @@ qedf_dbg_info(struct qedf_dbg_ctx *qedf, const char *func, u32 line,
> int
> qedf_alloc_grc_dump_buf(u8 **buf, uint32_t len)
> {
> - *buf = vmalloc(len);
> + *buf = vzalloc(len);
> if (!(*buf))
> return -ENOMEM;
>
> - memset(*buf, 0, len);
> return 0;
> }
>
>
Looks Good.
Reviewed-by: Himanshu Madhani <himanshu.madhani@...cle.com>
--
Himanshu Madhani Oracle Linux Engineering
Powered by blists - more mailing lists