* [PATCH -next] scsi: qedf: use vzalloc() instead of vmalloc()/memset(0)
@ 2021-05-18 13:20 Yang Yingliang
2021-05-18 15:52 ` Himanshu Madhani
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yang Yingliang @ 2021-05-18 13:20 UTC (permalink / raw)
To: linux-kernel, linux-scsi; +Cc: martin.petersen, skashyap
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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] scsi: qedf: use vzalloc() instead of vmalloc()/memset(0)
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
2021-05-21 20:31 ` Martin K. Petersen
2021-05-26 4:07 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Himanshu Madhani @ 2021-05-18 15:52 UTC (permalink / raw)
To: Yang Yingliang, linux-kernel, linux-scsi; +Cc: martin.petersen, skashyap
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] scsi: qedf: use vzalloc() instead of vmalloc()/memset(0)
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
@ 2021-05-21 20:31 ` Martin K. Petersen
2021-05-26 4:07 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-05-21 20:31 UTC (permalink / raw)
To: Yang Yingliang; +Cc: linux-kernel, linux-scsi, martin.petersen, skashyap
Yang,
> Use vzalloc() instead of vmalloc() and memset(0) to simpify the code.
Applied to 5.14/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] scsi: qedf: use vzalloc() instead of vmalloc()/memset(0)
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
2021-05-21 20:31 ` Martin K. Petersen
@ 2021-05-26 4:07 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-05-26 4:07 UTC (permalink / raw)
To: Yang Yingliang, linux-scsi, linux-kernel; +Cc: Martin K . Petersen, skashyap
On Tue, 18 May 2021 21:20:18 +0800, Yang Yingliang wrote:
> Use vzalloc() instead of vmalloc() and memset(0) to simpify
> the code.
Applied to 5.14/scsi-queue, thanks!
[1/1] scsi: qedf: use vzalloc() instead of vmalloc()/memset(0)
https://git.kernel.org/mkp/scsi/c/2a38d2a8b4a6
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-26 4:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-05-21 20:31 ` Martin K. Petersen
2021-05-26 4:07 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).