From: Corey Minyard Date: Tue, 20 Nov 2018 17:10:58 +0000 (-0600) Subject: arm:i2c: Don't mask return from i2c_recv() X-Git-Tag: v4.0.0-rc0~68^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=05f9f17e2caf249e9454f43e0c3751b2d06e1c06;p=thirdparty%2Fqemu.git 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 Suggested-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 442529cc653..7b45fe3ccf8 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);