xilinx_uartlite: suppress "cannot receive message"
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Wed, 5 Dec 2012 06:53:43 +0000 (16:53 +1000)
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>
Wed, 5 Dec 2012 08:20:36 +0000 (09:20 +0100)
This message is not an error condition, its just informing the user that
the device is corking the uart traffic to not drop characters.

Reported-by: Jason Wu <huanyu@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
hw/xilinx_uartlite.c

index d20fc4124bb71e7df46af5c7bf2df0c298f9a8c6..f890f2363db66a82e06469cb6acf1163906e6431 100644 (file)
@@ -182,12 +182,8 @@ static void uart_rx(void *opaque, const uint8_t *buf, int size)
 static int uart_can_rx(void *opaque)
 {
     struct xlx_uartlite *s = opaque;
-    int r;
 
-    r = s->rx_fifo_len < sizeof(s->rx_fifo);
-    if (!r)
-        printf("cannot receive!\n");
-    return r;
+    return s->rx_fifo_len < sizeof(s->rx_fifo);
 }
 
 static void uart_event(void *opaque, int event)