All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Egger, Christoph" <chegger@amazon.de>
To: David Vrabel <david.vrabel@citrix.com>, xen-devel@lists.xenproject.org
Cc: Liu Jinsong <jinsong.liu@alibaba-inc.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH 3/5] tools/mce: use calloc() instead of malloc()/memset() in xen-mceinj
Date: Tue, 24 Jun 2014 10:14:45 +0200	[thread overview]
Message-ID: <53A93375.6030303@amazon.de> (raw)
In-Reply-To: <1403546221-4149-4-git-send-email-david.vrabel@citrix.com>

On 23.06.14 19:56, David Vrabel wrote:
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>

Acked-by: Christoph Egger <chegger@amazon.de>

> ---
>  tools/tests/mce-test/tools/xen-mceinj.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tools/tests/mce-test/tools/xen-mceinj.c b/tools/tests/mce-test/tools/xen-mceinj.c
> index 51ca175..d4f889b 100644
> --- a/tools/tests/mce-test/tools/xen-mceinj.c
> +++ b/tools/tests/mce-test/tools/xen-mceinj.c
> @@ -284,10 +284,9 @@ static uint64_t guest_mfn(xc_interface *xc_handle,
>          err(xc_handle, "Failed to get platform information");
>  
>      /* Get guest's pfn list */
> -    pfn_buf = malloc(sizeof(uint64_t) * max_gpfn);
> +    pfn_buf = calloc(max_gpfn, sizeof(uint64_t));
>      if ( !pfn_buf )
>          err(xc_handle, "Failed to alloc pfn buf");
> -    memset(pfn_buf, 0, sizeof(uint64_t) * max_gpfn);
>  
>      ret = xc_get_pfn_list(xc_handle, domain, pfn_buf, max_gpfn);
>      if ( ret < 0 ) {
> 

  reply	other threads:[~2014-06-24  8:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-23 17:56 [PATCHv2 0/5] tools/mce: xen-mceinj improvements David Vrabel
2014-06-23 17:56 ` [PATCH 1/5] tools/mce: remove extra newlines from xen-mceinj error message David Vrabel
2014-06-23 17:56 ` [PATCH 2/5] tools/mce: clarify xen-mceinj usage David Vrabel
2014-06-23 17:56 ` [PATCH 3/5] tools/mce: use calloc() instead of malloc()/memset() in xen-mceinj David Vrabel
2014-06-24  8:14   ` Egger, Christoph [this message]
2014-06-23 17:57 ` [PATCH 4/5] tools/mce: refactor xen-mceinj to ease injection of other MCEs David Vrabel
2014-06-23 17:57 ` [PATCH 5/5] tools/mce: add more MCE types to xen-mceinj David Vrabel
2014-06-27 13:39 ` [PATCHv2 0/5] tools/mce: xen-mceinj improvements Ian Campbell

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=53A93375.6030303@amazon.de \
    --to=chegger@amazon.de \
    --cc=david.vrabel@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jinsong.liu@alibaba-inc.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.