[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH v3 19/41] hw/s390x: Use the BYTE-based definitions
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-trivial] [PATCH v3 19/41] hw/s390x: Use the BYTE-based definitions |
Date: |
Sun, 15 Apr 2018 20:42:45 -0300 |
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é <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Acked-by: Cornelia Huck <address@hidden>
---
hw/s390x/s390-skeys.c | 3 ++-
hw/s390x/s390-stattrib.c | 3 ++-
hw/s390x/sclp.c | 5 +++--
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c
index 76241c240e..a95373af94 100644
--- a/hw/s390x/s390-skeys.c
+++ b/hw/s390x/s390-skeys.c
@@ -10,6 +10,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "hw/boards.h"
#include "hw/s390x/storage-keys.h"
#include "qapi/error.h"
@@ -19,7 +20,7 @@
#include "sysemu/kvm.h"
#include "migration/register.h"
-#define S390_SKEYS_BUFFER_SIZE 131072 /* Room for 128k storage keys */
+#define S390_SKEYS_BUFFER_SIZE (128 * K_BYTE) /* Room for 128k storage keys */
#define S390_SKEYS_SAVE_FLAG_EOS 0x01
#define S390_SKEYS_SAVE_FLAG_SKEYS 0x02
#define S390_SKEYS_SAVE_FLAG_ERROR 0x04
diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c
index 70b95550a8..7a4a4e61d3 100644
--- a/hw/s390x/s390-stattrib.c
+++ b/hw/s390x/s390-stattrib.c
@@ -10,6 +10,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "hw/boards.h"
#include "cpu.h"
#include "migration/qemu-file.h"
@@ -20,7 +21,7 @@
#include "qapi/error.h"
#include "qapi/qmp/qdict.h"
-#define CMMA_BLOCK_SIZE (1 << 10)
+#define CMMA_BLOCK_SIZE (1 * K_BYTE)
#define STATTR_FLAG_EOS 0x01ULL
#define STATTR_FLAG_MORE 0x02ULL
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index 047d577313..4cd6548d49 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -13,6 +13,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "qapi/error.h"
#include "cpu.h"
#include "sysemu/sysemu.h"
@@ -288,8 +289,8 @@ static void sclp_realize(DeviceState *dev, Error **errp)
ret = s390_set_memory_limit(machine->maxram_size, &hw_limit);
if (ret == -E2BIG) {
- error_setg(&err, "host supports a maximum of %" PRIu64 " GB",
- hw_limit >> 30);
+ error_setg(&err, "host supports a maximum of %llu GB",
+ hw_limit / G_BYTE);
} else if (ret) {
error_setg(&err, "setting the guest size failed");
}
--
2.17.0
- [Qemu-trivial] [PATCH v3 09/41] hw/scsi: Use the BYTE-based definitions, (continued)
- [Qemu-trivial] [PATCH v3 09/41] hw/scsi: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 10/41] hw/smbios: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 11/41] hw/xen: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 12/41] hw/tpm: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 13/41] hw/block: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 15/41] hw/misc: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 16/41] hw/riscv: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 17/41] hw/m68k: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 18/41] hw/sparc: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 19/41] hw/s390x: Use the BYTE-based definitions,
Philippe Mathieu-Daudé <=
- [Qemu-trivial] [PATCH v3 21/41] hw/xtensa: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 22/41] hw/alpha: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 23/41] hw/tricore: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 24/41] hw/microblaze: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 25/41] hw/nios2: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 26/41] hw/cris: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 27/41] hw/lm32: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 28/41] hw/sh4: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 29/41] hw/mips: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15