Skip to contentSkip to conversation

hw/misc/stm32f4xx_syscfg: Fix copy/paste error

PATCH Applied Philippe Mathieu-Daudé 5 participants 5 messages Jan 21, 2020 – Jan 23, 2020 Arm STM32

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/misc/stm32f4xx_syscfg: Fix copy/paste error

Missed in 870c034da0b, hopefully reported by Coverity.

Fixes Coverity CID 1412793 (Incorrect expression)
---
 hw/misc/stm32f4xx_syscfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/misc/stm32f4xx_syscfg.c +1 -1
index dbcdca59f8..f960e4ea1e 100644
@@ -47,7 +47,7 @@ static void stm32f4xx_syscfg_set_irq(void *opaque, int irq, int level)
     STM32F4xxSyscfgState *s = opaque;
     int icrreg = irq / 4;
     int startbit = (irq & 3) * 4;
-    uint8_t config = config = irq / 16;
+    uint8_t config = irq / 16;
 
     trace_stm32f4xx_syscfg_set_irq(irq / 16, irq % 16, level);
 
Signature · 1 line
2.21.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Philippe Mathieu-Daudé

Missed in 870c034da0b, hopefully reported by Coverity.

Fixes Coverity CID 1412793 (Incorrect expression)

Alistair

Quoted 21 lines
---
 hw/misc/stm32f4xx_syscfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/misc/stm32f4xx_syscfg.c +1 -2
index dbcdca59f8..f960e4ea1e 100644
@@ -47,7 +47,7 @@ static void stm32f4xx_syscfg_set_irq(void *opaque, int irq, int level)
     STM32F4xxSyscfgState *s = opaque;
     int icrreg = irq / 4;
     int startbit = (irq & 3) * 4;
-    uint8_t config = config = irq / 16;
+    uint8_t config = irq / 16;
 
     trace_stm32f4xx_syscfg_set_irq(irq / 16, irq % 16, level);
 
--

2.21.1

Reviewed-by on v1 1/1
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 14 lines · Philippe Mathieu-Daudé

Missed in 870c034da0b, hopefully reported by Coverity.

Fixes Coverity CID 1412793 (Incorrect expression)
---
 hw/misc/stm32f4xx_syscfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/misc/stm32f4xx_syscfg.c +0 -0
index dbcdca59f8..f960e4ea1e 100644

hw/misc/stm32f4xx_syscfg.c static void stm32f4xx_syscfg_set_irq(void *opaque, int irq, int level) · line 53

Quoted 8 lines
hw/misc/stm32f4xx_syscfg.c +1 -1
@@ -47,7 +47,7 @@ static void stm32f4xx_syscfg_set_irq(void *opaque, int irq, int level)
     STM32F4xxSyscfgState *s = opaque;
     int icrreg = irq / 4;
     int startbit = (irq & 3) * 4;
-    uint8_t config = config = irq / 16;
+    uint8_t config = irq / 16;
 
     trace_stm32f4xx_syscfg_set_irq(irq / 16, irq % 16, level);
 
Reviewed-by on v1 1/1
#3 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 4 lines · Philippe Mathieu-Daudé

Missed in 870c034da0b, hopefully reported by Coverity.

Fixes Coverity CID 1412793 (Incorrect expression)
Quoted 16 lines
---
 hw/misc/stm32f4xx_syscfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/misc/stm32f4xx_syscfg.c +1 -1
index dbcdca59f8..f960e4ea1e 100644
@@ -47,7 +47,7 @@ static void stm32f4xx_syscfg_set_irq(void *opaque, int irq, int level)
     STM32F4xxSyscfgState *s = opaque;
     int icrreg = irq / 4;
     int startbit = (irq & 3) * 4;
-    uint8_t config = config = irq / 16;
+    uint8_t config = irq / 16;
 
     trace_stm32f4xx_syscfg_set_irq(irq / 16, irq % 16, level);
Signature · 1 line
Alex Bennée
#4 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 14 lines · Philippe Mathieu-Daudé

Missed in 870c034da0b, hopefully reported by Coverity.

Fixes Coverity CID 1412793 (Incorrect expression)
---
 hw/misc/stm32f4xx_syscfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/misc/stm32f4xx_syscfg.c +0 -0
index dbcdca59f8..f960e4ea1e 100644

hw/misc/stm32f4xx_syscfg.c static void stm32f4xx_syscfg_set_irq(void *opaque, int irq, int level) · line 52

Quoted 7 lines
hw/misc/stm32f4xx_syscfg.c +1 -1
@@ -47,7 +47,7 @@ static void stm32f4xx_syscfg_set_irq(void *opaque, int irq, int level)
     STM32F4xxSyscfgState *s = opaque;
     int icrreg = irq / 4;
     int startbit = (irq & 3) * 4;
-    uint8_t config = config = irq / 16;
+    uint8_t config = irq / 16;
 
     trace_stm32f4xx_syscfg_set_irq(irq / 16, irq % 16, level);

Applied to target-arm.next, thanks.

-- PMM