Re: [Qemu-devel] [PATCH] vmstate: constify VMStateField

2018-11-21 Thread Paolo Bonzini
On 14/11/18 14:29, Marc-André Lureau wrote: > Because they are supposed to remain const. > > Signed-off-by: Marc-André Lureau > --- > include/migration/vmstate.h | 6 +- > hw/display/virtio-gpu.c | 4 +- > hw/intc/s390_flic_kvm.c | 4 +- > hw/nvram/eeprom93xx.c | 6 +- >

Re: [Qemu-devel] [PATCH] vmstate: constify VMStateField

2018-11-15 Thread Cornelia Huck
On Wed, 14 Nov 2018 17:29:30 +0400 Marc-André Lureau wrote: > Because they are supposed to remain const. > > Signed-off-by: Marc-André Lureau > --- > include/migration/vmstate.h | 6 +- > hw/display/virtio-gpu.c | 4 +- > hw/intc/s390_flic_kvm.c | 4 +- > hw/nvram/eeprom93xx.c

Re: [Qemu-devel] [PATCH] vmstate: constify VMStateField

2018-11-15 Thread David Gibson
On Wed, Nov 14, 2018 at 05:29:30PM +0400, Marc-André Lureau wrote: > Because they are supposed to remain const. > > Signed-off-by: Marc-André Lureau Reviewed-by: David Gibson and ppc parts Acked-by: David Gibson > --- > include/migration/vmstate.h | 6 +- > hw/display/virtio-gpu.c |

Re: [Qemu-devel] [PATCH] vmstate: constify VMStateField

2018-11-14 Thread Christian Borntraeger
On 11/14/2018 05:56 PM, Thomas Huth wrote: > On 2018-11-14 17:49, Peter Maydell wrote: >> On 14 November 2018 at 16:39, Philippe Mathieu-Daudé >> wrote: >>> Hi Thomas, >>> >>> On 14/11/18 17:29, Thomas Huth wrote: Please don't. For rationale, see:

Re: [Qemu-devel] [PATCH] vmstate: constify VMStateField

2018-11-14 Thread Thomas Huth
On 2018-11-14 17:49, Peter Maydell wrote: > On 14 November 2018 at 16:39, Philippe Mathieu-Daudé > wrote: >> Hi Thomas, >> >> On 14/11/18 17:29, Thomas Huth wrote: >>> Please don't. For rationale, see: >>> https://www.kernel.org/doc/html/v4.19/process/coding-style.html#typedefs >> >> >> Thanks

Re: [Qemu-devel] [PATCH] vmstate: constify VMStateField

2018-11-14 Thread Peter Maydell
On 14 November 2018 at 16:39, Philippe Mathieu-Daudé wrote: > Hi Thomas, > > On 14/11/18 17:29, Thomas Huth wrote: >> Please don't. For rationale, see: >> https://www.kernel.org/doc/html/v4.19/process/coding-style.html#typedefs > > > Thanks for the pointer, I am interested in understanding why

Re: [Qemu-devel] [PATCH] vmstate: constify VMStateField

2018-11-14 Thread Philippe Mathieu-Daudé
Hi Thomas, On 14/11/18 17:29, Thomas Huth wrote: On 2018-11-14 16:32, Philippe Mathieu-Daudé wrote: What about enforcing the constness in the typedef? -- >8 -- @@ -32 +32 @@ typedef struct VMStateDescription VMStateDescription; -typedef struct VMStateField VMStateField; +typedef const struct

Re: [Qemu-devel] [PATCH] vmstate: constify VMStateField

2018-11-14 Thread Thomas Huth
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 >> --- >>   include/migration/vmstate.h |   6 +- >>   hw/display/virtio-gpu.c |   4 +- >>  

Re: [Qemu-devel] [PATCH] vmstate: constify VMStateField

2018-11-14 Thread Philippe Mathieu-Daudé
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 --- include/migration/vmstate.h | 6 +- hw/display/virtio-gpu.c | 4 +- hw/intc/s390_flic_kvm.c | 4 +- hw/nvram/eeprom93xx.c | 6

[Qemu-devel] [PATCH] vmstate: constify VMStateField

2018-11-14 Thread Marc-André Lureau
Because they are supposed to remain const. Signed-off-by: Marc-André Lureau --- 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