nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Wu Bo <wubo40@huawei.com>
To: <dan.j.williams@intel.com>, <vishal.l.verma@intel.com>,
	<dave.jiang@intel.com>, <ira.weiny@intel.com>, <bp@suse.de>,
	<rafael.j.wysocki@intel.com>, <mpe@ellerman.id.au>,
	<nvdimm@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Cc: <linfeilong@huawei.com>
Subject: Re: [PATCH] tools/testing/nvdimm: use vzalloc() instead of vmalloc()/memset(0)
Date: Fri, 4 Jun 2021 08:48:37 +0800	[thread overview]
Message-ID: <590552c1-5032-5243-20b5-e5701972812e@huawei.com> (raw)
In-Reply-To: <1622425715-146012-1-git-send-email-wubo40@huawei.com>

Friendly ping ...

On 2021/5/31 9:48, Wu Bo wrote:
> Use vzalloc() instead of vmalloc() and memset(0) to simpify
> the code.
> 
> Signed-off-by: Wu Bo <wubo40@huawei.com>
> ---
>   tools/testing/nvdimm/test/nfit.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
> index 54f367cbadae..258bba22780b 100644
> --- a/tools/testing/nvdimm/test/nfit.c
> +++ b/tools/testing/nvdimm/test/nfit.c
> @@ -1625,7 +1625,6 @@ static void *__test_alloc(struct nfit_test *t, size_t size, dma_addr_t *dma,
>   	if (rc)
>   		goto err;
>   	INIT_LIST_HEAD(&nfit_res->list);
> -	memset(buf, 0, size);
>   	nfit_res->dev = dev;
>   	nfit_res->buf = buf;
>   	nfit_res->res.start = *dma;
> @@ -1652,7 +1651,7 @@ static void *test_alloc(struct nfit_test *t, size_t size, dma_addr_t *dma)
>   	struct genpool_data_align data = {
>   		.align = SZ_128M,
>   	};
> -	void *buf = vmalloc(size);
> +	void *buf = vzalloc(size);
>   
>   	if (size >= DIMM_SIZE)
>   		*dma = gen_pool_alloc_algo(nfit_pool, size,
> 


  reply	other threads:[~2021-06-04  0:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31  1:48 [PATCH] tools/testing/nvdimm: use vzalloc() instead of vmalloc()/memset(0) Wu Bo
2021-06-04  0:48 ` Wu Bo [this message]
2021-06-04  6:48 ` Santosh Sivaraj

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=590552c1-5032-5243-20b5-e5701972812e@huawei.com \
    --to=wubo40@huawei.com \
    --cc=bp@suse.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linfeilong@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=nvdimm@lists.linux.dev \
    --cc=rafael.j.wysocki@intel.com \
    --cc=vishal.l.verma@intel.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;
as well as URLs for NNTP newsgroup(s).