summary refs log tree commit diff stats
path: root/hw/misc/iotkit-secctl.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-02-17 14:29:22 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-02-21 16:07:00 +0000
commit9df7401b80e7b19789aa625d77fe79c1f48b4b84 (patch)
tree9a5a3427bde38e5d284acf59b9a871516a5a833b /hw/misc/iotkit-secctl.c
parent7ffe647f52f85748b8d1d3a8dbebd742e0231bdc (diff)
downloadfocaccia-qemu-9df7401b80e7b19789aa625d77fe79c1f48b4b84.tar.gz
focaccia-qemu-9df7401b80e7b19789aa625d77fe79c1f48b4b84.zip
hw/misc/iotkit-secctl: Fix writing to 'PPC Interrupt Clear' register
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>
Diffstat (limited to 'hw/misc/iotkit-secctl.c')
-rw-r--r--hw/misc/iotkit-secctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/misc/iotkit-secctl.c b/hw/misc/iotkit-secctl.c
index 609869821a..9fdb82056a 100644
--- a/hw/misc/iotkit-secctl.c
+++ b/hw/misc/iotkit-secctl.c
@@ -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: