Patchwork [v1,2/3] xilinx_uartlite: suppress "cannot receive message"

login
register
mail settings
Submitter Peter Crosthwaite
Date Dec. 5, 2012, 6:53 a.m.
Message ID <e85c16cf2b15f81aafe0446fcce9f33b2a43cc2e.1354690179.git.peter.crosthwaite@xilinx.com>
Download mbox | patch
Permalink /patch/203794/
State New
Headers show

Comments

Peter Crosthwaite - Dec. 5, 2012, 6:53 a.m.
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>
---

 hw/xilinx_uartlite.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

Patch

diff --git a/hw/xilinx_uartlite.c b/hw/xilinx_uartlite.c
index d20fc41..f890f23 100644
--- a/hw/xilinx_uartlite.c
+++ b/hw/xilinx_uartlite.c
@@ -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)