]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
hw/misc/iotkit-secctl: Fix writing to 'PPC Interrupt Clear' register
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 17 Feb 2020 13:29:22 +0000 (14:29 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 21 Feb 2020 16:07:00 +0000 (16:07 +0000)
Fix warning reported by Clang static code analyzer:

    CC      hw/misc/iotkit-secctl.o
  hw/misc/iotkit-secctl.c:343:9: warning: Value stored to 'value' is never read
          value &= 0x00f000f3;
          ^        ~~~~~~~~~~

Fixes: b3717c23e1c
Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20200217132922.24607-1-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/misc/iotkit-secctl.c

index 609869821a12e9e124caef1900ece73afaf3d48e..9fdb82056a83755237b4e66b0a58d2bec018ba86 100644 (file)
@@ -340,7 +340,7 @@ static MemTxResult iotkit_secctl_s_write(void *opaque, hwaddr addr,
         qemu_set_irq(s->sec_resp_cfg, s->secrespcfg);
         break;
     case A_SECPPCINTCLR:
-        value &= 0x00f000f3;
+        s->secppcintstat &= ~(value & 0x00f000f3);
         foreach_ppc(s, iotkit_secctl_ppc_update_irq_clear);
         break;
     case A_SECPPCINTEN: