qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH 2/6] hw/net/smc91c111: Let smc91c111_can_receive() return a b


From: Alistair Francis
Subject: Re: [PATCH 2/6] hw/net/smc91c111: Let smc91c111_can_receive() return a boolean
Date: Thu, 5 Mar 2020 10:46:59 -0800

On Thu, Mar 5, 2020 at 9:57 AM Philippe Mathieu-Daudé <address@hidden> wrote:
>
> The smc91c111_can_receive() function simply returns a boolean value.
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>

Reviewed-by: Alistair Francis <address@hidden>

Alistair

> ---
>  hw/net/smc91c111.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
> index e9eb6f6c05..02be60c955 100644
> --- a/hw/net/smc91c111.c
> +++ b/hw/net/smc91c111.c
> @@ -130,16 +130,16 @@ static void smc91c111_update(smc91c111_state *s)
>      qemu_set_irq(s->irq, level);
>  }
>
> -static int smc91c111_can_receive(smc91c111_state *s)
> +static bool smc91c111_can_receive(smc91c111_state *s)
>  {
>      if ((s->rcr & RCR_RXEN) == 0 || (s->rcr & RCR_SOFT_RST)) {
> -        return 1;
> +        return true;
>      }
>      if (s->allocated == (1 << NUM_PACKETS) - 1 ||
>          s->rx_fifo_len == NUM_PACKETS) {
> -        return 0;
> +        return false;
>      }
> -    return 1;
> +    return true;
>  }
>
>  static inline void smc91c111_flush_queued_packets(smc91c111_state *s)
> --
> 2.21.1
>
>



reply via email to

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