qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 03/16] arm:i2c: Don't mask return from i2c_re


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH v3 03/16] arm:i2c: Don't mask return from i2c_recv()
Date: Mon, 26 Nov 2018 21:29:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

On 26/11/18 21:04, address@hidden wrote:
> From: Corey Minyard <address@hidden>
> 
> It can't fail, and now that it returns a uint8_t a 0xff mask
> is unnecessary.
> 
> Signed-off-by: Corey Minyard <address@hidden>
> Suggested-by: Peter Maydell <address@hidden>
> ---
>  hw/arm/stellaris.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
> index 6c69ce79b2..638b649911 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);
> 

This could be squashed in the previous patch.

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]