summary refs log tree commit diff stats
path: root/hw/usb/redirect.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-06-25 09:42:27 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-07-02 15:41:16 +0200
commit246e195b521b02860914754fd39f7809f96be67f (patch)
tree5d0dd75278d9f6316fd09bda81d9b1af600de593 /hw/usb/redirect.c
parent872a2b7c4dcad2d4fa2bd34747c37a28a76cec2b (diff)
downloadfocaccia-qemu-246e195b521b02860914754fd39f7809f96be67f.tar.gz
focaccia-qemu-246e195b521b02860914754fd39f7809f96be67f.zip
hw/usb: Use the IEC binary prefix definitions
It eases code review, unit is explicit.

Patch generated using:

  $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/

and modified manually.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180625124238.25339-36-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/usb/redirect.c')
-rw-r--r--hw/usb/redirect.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 58e8f7f5bd..99094a721e 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -26,6 +26,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/units.h"
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "qemu/timer.h"
@@ -1298,7 +1299,7 @@ static int usbredir_chardev_can_read(void *opaque)
     }
 
     /* usbredir_parser_do_read will consume *all* data we give it */
-    return 1024 * 1024;
+    return 1 * MiB;
 }
 
 static void usbredir_chardev_read(void *opaque, const uint8_t *buf, int size)