All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/intc/exynos4210_combiner: Don't overrun output_irq array in init
@ 2014-02-17 17:53 Peter Maydell
  2014-02-17 18:07 ` Paolo Bonzini
  2014-02-18  1:17 ` Andreas Färber
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Maydell @ 2014-02-17 17:53 UTC (permalink / raw)
  To: qemu-devel
  Cc: Igor Mitsyanko, Maksim Kozlov, Dmitry Solodkiy, Evgeny Voevodin, patches

The Exynos4210 combiner has IIC_NIRQ inputs and IIC_NGRP outputs;
use the correct constant in the loop initializing our output
sysbus IRQs so that we don't overrun the output_irq[] array.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/intc/exynos4210_combiner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c
index ef5e8eb..3287479 100644
--- a/hw/intc/exynos4210_combiner.c
+++ b/hw/intc/exynos4210_combiner.c
@@ -418,7 +418,7 @@ static int exynos4210_combiner_init(SysBusDevice *sbd)
     qdev_init_gpio_in(dev, exynos4210_combiner_handler, IIC_NIRQ);
 
     /* Connect SysBusDev irqs to device specific irqs */
-    for (i = 0; i < IIC_NIRQ; i++) {
+    for (i = 0; i < IIC_NGRP; i++) {
         sysbus_init_irq(sbd, &s->output_irq[i]);
     }
 
-- 
1.8.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/intc/exynos4210_combiner: Don't overrun output_irq array in init
  2014-02-17 17:53 [Qemu-devel] [PATCH] hw/intc/exynos4210_combiner: Don't overrun output_irq array in init Peter Maydell
@ 2014-02-17 18:07 ` Paolo Bonzini
  2014-02-18  1:17 ` Andreas Färber
  1 sibling, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2014-02-17 18:07 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: Igor Mitsyanko, Maksim Kozlov, Dmitry Solodkiy, Evgeny Voevodin, patches

Il 17/02/2014 18:53, Peter Maydell ha scritto:
> The Exynos4210 combiner has IIC_NIRQ inputs and IIC_NGRP outputs;
> use the correct constant in the loop initializing our output
> sysbus IRQs so that we don't overrun the output_irq[] array.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  hw/intc/exynos4210_combiner.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c
> index ef5e8eb..3287479 100644
> --- a/hw/intc/exynos4210_combiner.c
> +++ b/hw/intc/exynos4210_combiner.c
> @@ -418,7 +418,7 @@ static int exynos4210_combiner_init(SysBusDevice *sbd)
>      qdev_init_gpio_in(dev, exynos4210_combiner_handler, IIC_NIRQ);
>
>      /* Connect SysBusDev irqs to device specific irqs */
> -    for (i = 0; i < IIC_NIRQ; i++) {
> +    for (i = 0; i < IIC_NGRP; i++) {
>          sysbus_init_irq(sbd, &s->output_irq[i]);
>      }
>
> -- 1.8.5

I think I saw more of these in Coverity output.

Paolo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/intc/exynos4210_combiner: Don't overrun output_irq array in init
  2014-02-17 17:53 [Qemu-devel] [PATCH] hw/intc/exynos4210_combiner: Don't overrun output_irq array in init Peter Maydell
  2014-02-17 18:07 ` Paolo Bonzini
@ 2014-02-18  1:17 ` Andreas Färber
  2014-02-24 15:44   ` Peter Maydell
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2014-02-18  1:17 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: Evgeny Voevodin, patches, Igor Mitsyanko, qemu-stable,
	Dmitry Solodkiy, Maksim Kozlov

Am 17.02.2014 18:53, schrieb Peter Maydell:
> The Exynos4210 combiner has IIC_NIRQ inputs and IIC_NGRP outputs;
> use the correct constant in the loop initializing our output
> sysbus IRQs so that we don't overrun the output_irq[] array.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  hw/intc/exynos4210_combiner.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c
> index ef5e8eb..3287479 100644
> --- a/hw/intc/exynos4210_combiner.c
> +++ b/hw/intc/exynos4210_combiner.c
> @@ -418,7 +418,7 @@ static int exynos4210_combiner_init(SysBusDevice *sbd)
>      qdev_init_gpio_in(dev, exynos4210_combiner_handler, IIC_NIRQ);
>  
>      /* Connect SysBusDev irqs to device specific irqs */
> -    for (i = 0; i < IIC_NIRQ; i++) {
> +    for (i = 0; i < IIC_NGRP; i++) {

Reviewed-by: Andreas Färber <afaerber@suse.de>

It seems that IIC_NIRQ == IIC_NGRP * 8, so please don't forget to Cc
qemu-stable@nongnu.org in the commit message for 1.7.1.

Regards,
Andreas

>          sysbus_init_irq(sbd, &s->output_irq[i]);
>      }
>  

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/intc/exynos4210_combiner: Don't overrun output_irq array in init
  2014-02-18  1:17 ` Andreas Färber
@ 2014-02-24 15:44   ` Peter Maydell
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2014-02-24 15:44 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Evgeny Voevodin, Patch Tracking, Igor Mitsyanko, QEMU Developers,
	qemu-stable, Dmitry Solodkiy, Maksim Kozlov

On 18 February 2014 01:17, Andreas Färber <afaerber@suse.de> wrote:
> Am 17.02.2014 18:53, schrieb Peter Maydell:
>> The Exynos4210 combiner has IIC_NIRQ inputs and IIC_NGRP outputs;
>> use the correct constant in the loop initializing our output
>> sysbus IRQs so that we don't overrun the output_irq[] array.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>>  hw/intc/exynos4210_combiner.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c
>> index ef5e8eb..3287479 100644
>> --- a/hw/intc/exynos4210_combiner.c
>> +++ b/hw/intc/exynos4210_combiner.c
>> @@ -418,7 +418,7 @@ static int exynos4210_combiner_init(SysBusDevice *sbd)
>>      qdev_init_gpio_in(dev, exynos4210_combiner_handler, IIC_NIRQ);
>>
>>      /* Connect SysBusDev irqs to device specific irqs */
>> -    for (i = 0; i < IIC_NIRQ; i++) {
>> +    for (i = 0; i < IIC_NGRP; i++) {
>
> Reviewed-by: Andreas Färber <afaerber@suse.de>
>
> It seems that IIC_NIRQ == IIC_NGRP * 8, so please don't forget to Cc
> qemu-stable@nongnu.org in the commit message for 1.7.1.

Thanks; applied to target-arm.next and added the cc:stable line.

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-24 15:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17 17:53 [Qemu-devel] [PATCH] hw/intc/exynos4210_combiner: Don't overrun output_irq array in init Peter Maydell
2014-02-17 18:07 ` Paolo Bonzini
2014-02-18  1:17 ` Andreas Färber
2014-02-24 15:44   ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.