From: Himanshu Madhani <himanshu.madhani@oracle.com>
To: Yang Yingliang <yangyingliang@huawei.com>,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Cc: martin.petersen@oracle.com, skashyap@marvell.com
Subject: Re: [PATCH -next] scsi: qedf: use vzalloc() instead of vmalloc()/memset(0)
Date: Tue, 18 May 2021 10:52:51 -0500 [thread overview]
Message-ID: <3b03d6f8-fa69-e8ec-98ca-7a0319afe0dd@oracle.com> (raw)
In-Reply-To: <20210518132018.1312995-1-yangyingliang@huawei.com>
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@huawei.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@oracle.com>
--
Himanshu Madhani Oracle Linux Engineering
next prev parent reply other threads:[~2021-05-18 15:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 13:20 [PATCH -next] scsi: qedf: use vzalloc() instead of vmalloc()/memset(0) Yang Yingliang
2021-05-18 15:52 ` Himanshu Madhani [this message]
2021-05-21 20:31 ` Martin K. Petersen
2021-05-26 4:07 ` 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=3b03d6f8-fa69-e8ec-98ca-7a0319afe0dd@oracle.com \
--to=himanshu.madhani@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=skashyap@marvell.com \
--cc=yangyingliang@huawei.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