Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Peter Maydell
On Mon, 19 Oct 2020 at 10:36, 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. > > Fixes: 9d68bf564e ("arm: Stub out NRF51 TWI magnetometer/accelerometer > detection") > Reported-by: Eule

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Peng Liang
On 10/20/2020 7:27 PM, Peter Maydell wrote: > On Tue, 20 Oct 2020 at 12:17, 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_v

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Peng Liang
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_vmsta

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Peter Maydell
On Tue, 20 Oct 2020 at 12:17, 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. > >

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Philippe Mathieu-Daudé
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

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Peng Liang
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 futur

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-19 Thread Peng Liang
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 futur

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-19 Thread Philippe Mathieu-Daudé
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é Fixes: 9d68

[PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-19 Thread Peng Liang
VMStateDescription.fields should be end with VMSTATE_END_OF_LIST(). However, microbit_i2c_vmstate doesn't follow it. Let's change it. Fixes: 9d68bf564e ("arm: Stub out NRF51 TWI magnetometer/accelerometer detection") Reported-by: Euler Robot Signed-off-by: Peng Liang --- hw/i2c/microbit_i2c.c