[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: |
Cédric Le Goater |
Subject: |
Re: [PATCH 2/6] hw/net/smc91c111: Let smc91c111_can_receive() return a boolean |
Date: |
Fri, 6 Mar 2020 16:26:04 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 3/5/20 6:56 PM, Philippe Mathieu-Daudé wrote:
> The smc91c111_can_receive() function simply returns a boolean value.
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
> ---
> 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)
>
- [PATCH 0/6] hw/net: Make Net/CanBus can_receive() handlers return a boolean, Philippe Mathieu-Daudé, 2020/03/05
- [PATCH 1/6] hw/net/e1000e_core: Let e1000e_can_receive() return a boolean, Philippe Mathieu-Daudé, 2020/03/05
- [PATCH 3/6] hw/net/rtl8139: Simplify if/else statement, Philippe Mathieu-Daudé, 2020/03/05
- [PATCH 2/6] hw/net/smc91c111: Let smc91c111_can_receive() return a boolean, Philippe Mathieu-Daudé, 2020/03/05
- [PATCH 4/6] hw/net/rtl8139: Update coding style to make checkpatch.pl happy, Philippe Mathieu-Daudé, 2020/03/05
- [PATCH 5/6] hw/net: Make NetCanReceive() return a boolean, Philippe Mathieu-Daudé, 2020/03/05
- [PATCH 6/6] hw/net/can: Make CanBusClientInfo::can_receive() return a boolean, Philippe Mathieu-Daudé, 2020/03/05