summaryrefslogtreecommitdiffstats
path: root/hw/char/etraxfs_ser.c
diff options
context:
space:
mode:
authorPeter Maydell2015-10-09 11:45:09 +0200
committerPeter Maydell2015-10-09 11:45:09 +0200
commit8be6e623a28497d1dcd10547a573c9143ece525c (patch)
tree83b37e35a4a3eca44bb4e077c96fc67dd4e400b6 /hw/char/etraxfs_ser.c
parentMerge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20151007.0' i... (diff)
parenttests: Unique test path for /string-visitor/output (diff)
downloadqemu-8be6e623a28497d1dcd10547a573c9143ece525c.tar.gz
qemu-8be6e623a28497d1dcd10547a573c9143ece525c.tar.xz
qemu-8be6e623a28497d1dcd10547a573c9143ece525c.zip
Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-10-08' into staging
trivial patches for 2015-10-08 # gpg: Signature made Thu 08 Oct 2015 17:51:05 BST using RSA key ID A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" * remotes/mjt/tags/pull-trivial-patches-2015-10-08: tests: Unique test path for /string-visitor/output linux-user: Remove type casts to union type linux-user: Use g_new() & friends where that makes obvious sense rocker: Use g_new() & friends where that makes obvious sense .travis.yml: Run make check for all targets, not just some hw: char: Remove unnecessary variable hw: timer: Remove unnecessary variable qapi: add missing @ MAINTAINERS: Add NSIS file for W32, W64 hosts target-ppc: Remove unnecessary variable target-microblaze: Remove unnecessary variable s/cpu_get_real_ticks/cpu_get_host_ticks/ pc: check for underflow in load_linux pci-assign: do not include sys/io.h block/ssh: remove dead code imx_serial: Generate interrupt on tx empty if enabled sdhci: Change debug prints to compile unconditionally sdhci: use PRIx64 for uint64_t type Add .dir-locals.el file to configure emacs coding style Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/char/etraxfs_ser.c')
-rw-r--r--hw/char/etraxfs_ser.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/char/etraxfs_ser.c b/hw/char/etraxfs_ser.c
index 857c13621c..562021e28b 100644
--- a/hw/char/etraxfs_ser.c
+++ b/hw/char/etraxfs_ser.c
@@ -182,15 +182,13 @@ static void serial_receive(void *opaque, const uint8_t *buf, int size)
static int serial_can_receive(void *opaque)
{
ETRAXSerial *s = opaque;
- int r;
/* Is the receiver enabled? */
if (!(s->regs[RW_REC_CTRL] & (1 << 3))) {
return 0;
}
- r = sizeof(s->rx_fifo) - s->rx_fifo_len;
- return r;
+ return sizeof(s->rx_fifo) - s->rx_fifo_len;
}
static void serial_event(void *opaque, int event)