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

[Xen-changelog] [xen master] xen/char: scif-uart: Remove useless ASSERT condition



commit 1eeedaf5a0d9ed6324f3bd5b700bb22eb4355341
Author:     Artem Mygaiev <joculator@xxxxxxxxx>
AuthorDate: Wed Oct 9 17:20:16 2019 +0300
Commit:     Julien Grall <julien@xxxxxxx>
CommitDate: Sat Jan 18 12:57:15 2020 +0000

    xen/char: scif-uart: Remove useless ASSERT condition
    
    cnt is unsigned, so always >=0
    
    Coverity-ID: 1381848
    Signed-off-by: Artem Mygaiev <artem_mygaiev@xxxxxxxx>
    [julien: Update commit title]
    Acked-by: Julien Grall <julien@xxxxxxx>
---
 xen/drivers/char/scif-uart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/drivers/char/scif-uart.c b/xen/drivers/char/scif-uart.c
index fa0b8274ca..9d3f66b55b 100644
--- a/xen/drivers/char/scif-uart.c
+++ b/xen/drivers/char/scif-uart.c
@@ -205,7 +205,7 @@ static int scif_uart_tx_ready(struct serial_port *port)
 
      /* Check number of data bytes stored in TX FIFO */
     cnt = scif_readw(uart, SCIF_SCFDR) >> 8;
-    ASSERT( cnt >= 0 && cnt <= params->fifo_size );
+    ASSERT( cnt <= params->fifo_size );
 
     return (params->fifo_size - cnt);
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.