From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Fam Zheng <famz@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Aurelien Jarno <aurelien@aurel32.net>,
Cornelia Huck <cohuck@redhat.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
dgilbert@redhat.com, quintela@redhat.com,
"open list:S390" <qemu-s390x@nongnu.org>,
"open list:ARM" <qemu-arm@nongnu.org>,
"open list:PowerPC" <qemu-ppc@nongnu.org>,
Gerd Hoffmann <kraxel@redhat.com>,
Aleksandar Markovic <amarkovic@wavecomp.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Stafford Horne <shorne@gmail.com>,
Richard Henderson <rth@twiddle.net>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Artyom Tarasenko <atar4qemu@gmail.com>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH] vmstate: constify VMStateField
Date: Wed, 14 Nov 2018 17:29:42 +0100 [thread overview]
Message-ID: <a2d9a2fd-2c1a-66e3-86ba-17da9f564e79@redhat.com> (raw)
In-Reply-To: <16b78816-f2cc-a1e5-0d21-906fc2dbaa3d@redhat.com>
On 2018-11-14 16:32, Philippe Mathieu-Daudé wrote:
> Hi Marc-André,
>
> On 14/11/18 14:29, Marc-André Lureau wrote:
>> Because they are supposed to remain const.
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>> include/migration/vmstate.h | 6 +-
>> hw/display/virtio-gpu.c | 4 +-
>> hw/intc/s390_flic_kvm.c | 4 +-
>> hw/nvram/eeprom93xx.c | 6 +-
>> hw/nvram/fw_cfg.c | 6 +-
>> hw/pci/msix.c | 4 +-
>> hw/pci/pci.c | 8 +--
>> hw/pci/shpc.c | 7 ++-
>> hw/scsi/scsi-bus.c | 4 +-
>> hw/timer/twl92230.c | 4 +-
>> hw/usb/redirect.c | 12 ++--
>> hw/virtio/virtio.c | 8 +--
>> migration/savevm.c | 7 ++-
>> migration/vmstate-types.c | 119 ++++++++++++++++++++----------------
>> migration/vmstate.c | 31 +++++-----
>> target/alpha/machine.c | 5 +-
>> target/arm/machine.c | 12 ++--
>> target/hppa/machine.c | 10 +--
>> target/mips/machine.c | 14 +++--
>> target/openrisc/machine.c | 5 +-
>> target/ppc/machine.c | 14 +++--
>> target/sparc/machine.c | 7 ++-
>> 22 files changed, 162 insertions(+), 135 deletions(-)
>>
>> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
>> index 2b501d0466..61bef3ef5c 100644
>> --- a/include/migration/vmstate.h
>> +++ b/include/migration/vmstate.h
>> @@ -40,8 +40,8 @@ typedef struct VMStateField VMStateField;
>
> What about enforcing the constness in the typedef?
>
> -- >8 --
> @@ -32 +32 @@ typedef struct VMStateDescription VMStateDescription;
> -typedef struct VMStateField VMStateField;
> +typedef const struct VMStateField VMStateField;
> ---
Please don't. For rationale, see:
https://www.kernel.org/doc/html/v4.19/process/coding-style.html#typedefs
Thomas
next prev parent reply other threads:[~2018-11-14 16:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 13:29 [Qemu-devel] [PATCH] vmstate: constify VMStateField Marc-André Lureau
2018-11-14 15:32 ` Philippe Mathieu-Daudé
2018-11-14 16:29 ` Thomas Huth [this message]
2018-11-14 16:39 ` Philippe Mathieu-Daudé
2018-11-14 16:49 ` Peter Maydell
2018-11-14 16:56 ` Thomas Huth
2018-11-14 17:00 ` Christian Borntraeger
2018-11-15 10:38 ` David Gibson
2018-11-15 16:10 ` Cornelia Huck
2018-11-21 17:52 ` Paolo Bonzini
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=a2d9a2fd-2c1a-66e3-86ba-17da9f564e79@redhat.com \
--to=thuth@redhat.com \
--cc=amarkovic@wavecomp.com \
--cc=atar4qemu@gmail.com \
--cc=aurelien@aurel32.net \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=dgilbert@redhat.com \
--cc=famz@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=quintela@redhat.com \
--cc=rth@twiddle.net \
--cc=shorne@gmail.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).