On 05/04/18 00:17, Amit Tomer wrote:
> Hi,
> 
>> Ah yes, if that works, we should. That bit is from the Linux BSP, isn't it?
> 
> Yes, it's from Linux BSP code only. Hope following is fine.
> 
>     if ( reg & STATUS_TXFIFO_EMP )
>         return TX_FIFO_SIZE;
>     else if ( reg & STAT_TX_FIFO_HFL )

no else needed.
I'd write it like:
        if (empty)
                return FIFO_SIZE;

        if (full)
                return 0;

        if (half)
                return FIFO_SIZE / 2;

        /* comment ... */
        return 1;

Cheers,
Andre.

>         return TX_FIFO_SIZE / 2;
>     else if ( !(reg & STAT_TX_FIFO_FUL) )
>         return 1;
> 
>    return 0;
> 
> Thanks
> -Amit
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to