Re: [Qemu-devel] [RFC v2 2/4] hw/arm/virt: find_machine_info: handle NULL value

2015-01-05 Thread Peter Maydell
On 5 January 2015 at 16:31, alvise rigo wrote: > It's just because in patch 1/4 of this series we use > find_machine_info(machine->cpu_model), which could be a NULL pointer. Well, don't do that, because in that case you'll do the wrong thing if we take the default value of the cpu model. But I do

Re: [Qemu-devel] [RFC v2 2/4] hw/arm/virt: find_machine_info: handle NULL value

2015-01-05 Thread alvise rigo
It's just because in patch 1/4 of this series we use find_machine_info(machine->cpu_model), which could be a NULL pointer. Indeed this patch can be avoided reworking a bit the calling function code. Regards, alvise On Mon, Jan 5, 2015 at 4:36 PM, Peter Maydell wrote: > On 21 November 2014 at 18:

Re: [Qemu-devel] [RFC v2 2/4] hw/arm/virt: find_machine_info: handle NULL value

2015-01-05 Thread Peter Maydell
On 21 November 2014 at 18:07, Alvise Rigo wrote: > Signed-off-by: Alvise Rigo > --- > hw/arm/virt.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index e8d527d..4e7b869 100644 > --- a/hw/arm/virt.c > +++ b/hw/arm/virt.c > @@ -151,6 +151,10 @@ static

[Qemu-devel] [RFC v2 2/4] hw/arm/virt: find_machine_info: handle NULL value

2014-11-24 Thread Alvise Rigo
Signed-off-by: Alvise Rigo --- hw/arm/virt.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index e8d527d..4e7b869 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -151,6 +151,10 @@ static VirtBoardInfo *find_machine_info(const char *cpu) { int i; +