projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f983ff9
)
ibex_uart: fix XOR-as-pow
author
Paolo Bonzini
<pbonzini@redhat.com>
Tue, 23 Jun 2020 19:54:25 +0000
(15:54 -0400)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Fri, 26 Jun 2020 13:39:40 +0000
(09:39 -0400)
The xor-as-pow warning in clang actually detected a genuine bug.
Fix it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/char/ibex_uart.c
patch
|
blob
|
history
diff --git
a/hw/char/ibex_uart.c
b/hw/char/ibex_uart.c
index 3e0dd9968eeb955bff3b73441bbaae4ec9608b9a..45cd7249982488e3019455719876421388b43130 100644
(file)
--- a/
hw/char/ibex_uart.c
+++ b/
hw/char/ibex_uart.c
@@
-331,7
+331,7
@@
static void ibex_uart_write(void *opaque, hwaddr addr,
if (value & UART_CTRL_NCO) {
uint64_t baud = ((value & UART_CTRL_NCO) >> 16);
baud *= 1000;
- baud
/= 2 ^
20;
+ baud
>>=
20;
s->char_tx_time = (NANOSECONDS_PER_SECOND / baud) * 10;
}