summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/riscv/mta1_mkdf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/riscv/mta1_mkdf.c b/hw/riscv/mta1_mkdf.c
index fb5580a49c..467539543e 100644
--- a/hw/riscv/mta1_mkdf.c
+++ b/hw/riscv/mta1_mkdf.c
@@ -162,9 +162,9 @@ static void mta1_mkdf_mmio_write(void *opaque, hwaddr addr, uint64_t val, unsign
case MTA1_MKDF_MMIO_MTA1_LED:
s->led = val;
qemu_log_mask(LOG_GUEST_ERROR, "%s: MTA1_LED rgb:%c%c%c\n", __func__,
- val & MTA1_MKDF_MMIO_MTA1_LED_R_BIT ? '1' : '0',
- val & MTA1_MKDF_MMIO_MTA1_LED_G_BIT ? '1' : '0',
- val & MTA1_MKDF_MMIO_MTA1_LED_B_BIT ? '1' : '0');
+ val & (1 << MTA1_MKDF_MMIO_MTA1_LED_R_BIT) ? '1' : '0',
+ val & (1 << MTA1_MKDF_MMIO_MTA1_LED_G_BIT) ? '1' : '0',
+ val & (1 << MTA1_MKDF_MMIO_MTA1_LED_B_BIT) ? '1' : '0');
return;
case MTA1_MKDF_MMIO_TOUCH_STATUS:
// Always touched, we don't care about touch reset