summaryrefslogtreecommitdiffstats
path: root/hw/arm/stellaris.c
diff options
context:
space:
mode:
authorCorey Minyard2018-11-20 18:10:58 +0100
committerCorey Minyard2019-02-28 04:06:08 +0100
commit05f9f17e2caf249e9454f43e0c3751b2d06e1c06 (patch)
tree11439e59d8cd3008a772f21227b343c02c7a9458 /hw/arm/stellaris.c
parenti2c: have I2C receive operation return uint8_t (diff)
downloadqemu-05f9f17e2caf249e9454f43e0c3751b2d06e1c06.tar.gz
qemu-05f9f17e2caf249e9454f43e0c3751b2d06e1c06.tar.xz
qemu-05f9f17e2caf249e9454f43e0c3751b2d06e1c06.zip
arm:i2c: Don't mask return from i2c_recv()
It can't fail, and now that it returns a uint8_t a 0xff mask is unnecessary. Signed-off-by: Corey Minyard <cminyard@mvista.com> Suggested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/stellaris.c')
-rw-r--r--hw/arm/stellaris.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index 442529cc65..7b45fe3ccf 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -811,7 +811,7 @@ static void stellaris_i2c_write(void *opaque, hwaddr offset,
/* TODO: Handle errors. */
if (s->msa & 1) {
/* Recv */
- s->mdr = i2c_recv(s->bus) & 0xff;
+ s->mdr = i2c_recv(s->bus);
} else {
/* Send */
i2c_send(s->bus, s->mdr);