From: Peng Liang <liangpeng10@huawei.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, joel@jms.id.au, xiexiangyou@huawei.com,
zhang.zhanghailiang@huawei.com
Subject: Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate
Date: Tue, 20 Oct 2020 20:07:36 +0800 [thread overview]
Message-ID: <db7b6e1e-bd6c-2092-ea7c-af8398e57526@huawei.com> (raw)
In-Reply-To: <d45ce658-f628-ae9d-1db2-68a14d815333@redhat.com>
On 10/20/2020 7:27 PM, Philippe Mathieu-Daudé wrote:
> On 10/20/20 1:17 PM, Peng Liang wrote:
>> On 10/19/2020 6:35 PM, Philippe Mathieu-Daudé wrote:
>>> On 10/19/20 11:34 AM, Peng Liang wrote:
>>>> VMStateDescription.fields should be end with VMSTATE_END_OF_LIST().
>>>> However, microbit_i2c_vmstate doesn't follow it. Let's change it.
>>>
>>> It might be easy to add a Coccinelle script to avoid future errors.
>>>
>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>
>>
>> I tried to add a Coccinelle script to add VMSTATE_END_OF_LIST() to the
>> end of VMStateDescription.fields. For those who are not defined as
>> compound literals, it works well. However, I cannot make it work for
>> those defined as compound literals. And Julia doesn't think compound
>> literals are supported currently[1]. So maybe currently it's hard to
>> check the error using Coccinelle :(
>
> Interesting.
>
>>
>> Thanks for my colleague Biaoxiang Ye, who wrote a shell script to find
>> the errors, I didn't find other similar errors.
>
> Thanks for giving it a try. We could commit and run the script
> in a gitlab-ci job to avoid such regressions.
>
The script will report all fields not defined as compound literals as
errors (the number is much smaller than that of all
VMStateDescription.fields).
--
Thanks,
Peng
next prev parent reply other threads:[~2020-10-20 12:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 9:34 [PATCH] microbit_i2c: Fix coredump when dump-vmstate Peng Liang
2020-10-19 10:35 ` Philippe Mathieu-Daudé
2020-10-19 14:30 ` Peng Liang
2020-10-20 11:17 ` Peng Liang
2020-10-20 11:27 ` Philippe Mathieu-Daudé
2020-10-20 12:07 ` Peng Liang [this message]
2020-10-20 11:27 ` Peter Maydell
2020-10-20 12:19 ` Peng Liang
2020-10-20 14:36 ` Peter Maydell
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=db7b6e1e-bd6c-2092-ea7c-af8398e57526@huawei.com \
--to=liangpeng10@huawei.com \
--cc=joel@jms.id.au \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=xiexiangyou@huawei.com \
--cc=zhang.zhanghailiang@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;
as well as URLs for NNTP newsgroup(s).