All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Guang <lig.fnst@cn.fujitsu.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v6 1/5] hw/ptimer: add VMSTATE_PTIMER_ARRAY
Date: Mon, 02 Dec 2013 12:28:11 +0800	[thread overview]
Message-ID: <529C0C5B.3010307@cn.fujitsu.com> (raw)
In-Reply-To: <CAFEAcA8tKW3MErWxOvn_XDx4L-LTih+4xs-oQeGew1wxWg1e9A@mail.gmail.com>

Peter Maydell wrote:
> On 29 November 2013 11:01, Peter Maydell<peter.maydell@linaro.org>  wrote:
>    
>> On 27 November 2013 08:23, liguang<lig.fnst@cn.fujitsu.com>  wrote:
>>      
>>> Signed-off-by: liguang<lig.fnst@cn.fujitsu.com>
>>> ---
>>>   include/hw/ptimer.h |    3 +++
>>>   1 files changed, 3 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/include/hw/ptimer.h b/include/hw/ptimer.h
>>> index 28fcaf1..a9b8f1d 100644
>>> --- a/include/hw/ptimer.h
>>> +++ b/include/hw/ptimer.h
>>> @@ -27,6 +27,9 @@ void ptimer_stop(ptimer_state *s);
>>>
>>>   extern const VMStateDescription vmstate_ptimer;
>>>
>>> +#define VMSTATE_PTIMER_ARRAY(_f, _s, _n) \
>>> +    VMSTATE_STRUCT_ARRAY(_f, _s, _n, 0, vmstate_ptimer, ptimer_state*)
>>>        
>> The final parameter here should just be the struct type
>> ("ptimer_state"), not a pointer-to-it.
>>      
> Actually, looking at the patch where you've used this,
> you do actually want to deal with an
> array-of-pointers-to-ptimers. For that you need
>
> #define VMSTATE_PTIMER_ARRAY(_f, _s, _n) \
>      VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0, vmstate_ptimer, ptimer_state *)
>
> (compare VMSTATE_TIMER_ARRAY in vmstate.h)
>
>
>    

OK, thanks!

  reply	other threads:[~2013-12-02  4:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27  8:23 [Qemu-devel] [PATCH v6 0/5] add sunxi machine type liguang
2013-11-27  8:23 ` [Qemu-devel] [PATCH v6 1/5] hw/ptimer: add VMSTATE_PTIMER_ARRAY liguang
2013-11-29 11:01   ` Peter Maydell
2013-11-29 11:11     ` Peter Maydell
2013-12-02  4:28       ` Li Guang [this message]
2013-11-27  8:23 ` [Qemu-devel] [PATCH v6 2/5] hw/timer: add sunxi timer device liguang
2013-11-27  8:23 ` [Qemu-devel] [PATCH v6 3/5] hw/intc: add sunxi interrupt controller device liguang
2013-11-27  8:23 ` [Qemu-devel] [PATCH v6 4/5] hw/arm: add sunxi machine type liguang
2013-11-27  8:23 ` [Qemu-devel] [PATCH v6 5/5] MAINTAINERS: add myself to maintain sunxi machine liguang
2013-11-27  8:28 ` [Qemu-devel] [PATCH v6 0/5] add sunxi machine type Peter Crosthwaite
2013-11-27  8:35   ` Li Guang

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=529C0C5B.3010307@cn.fujitsu.com \
    --to=lig.fnst@cn.fujitsu.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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.