qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] stm32f4xx_syscfg: remove redundant code to fix coverity warn


From: Thomas Huth
Subject: Re: [PATCH] stm32f4xx_syscfg: remove redundant code to fix coverity warning
Date: Thu, 23 Jan 2020 06:26:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 23/01/2020 03.38, address@hidden wrote:
> From: Pan Nengyuan <address@hidden>
> 
> Fixes the coverity warning:
>     CID 91708242: (EVALUATION_ORDER)
>     50. write_write_typo: In "config = config = irq / 16", "config" is 
> written twice with the same value.
>     50    uint8_t config = config = irq / 16;
> 
> Reported-by: Euler Robot <address@hidden>
> Signed-off-by: Pan Nengyuan <address@hidden>
> ---
>  hw/misc/stm32f4xx_syscfg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/misc/stm32f4xx_syscfg.c b/hw/misc/stm32f4xx_syscfg.c
> index dbcdca59f8..f960e4ea1e 100644
> --- a/hw/misc/stm32f4xx_syscfg.c
> +++ b/hw/misc/stm32f4xx_syscfg.c
> @@ -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;

Thanks, but Philippe already posted a patch for this :

https://lists.gnu.org/archive/html/qemu-devel/2020-01/msg04823.html

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]