[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/26] ppc/pnv: Improve macro parenthesization
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 15/26] ppc/pnv: Improve macro parenthesization |
Date: |
Wed, 27 Sep 2017 17:43:05 +1000 |
From: Eric Blake <address@hidden>
Although none of the existing macro call-sites were broken,
it's always better to write macros that properly parenthesize
arguments that can be complex expressions, so that the intended
order of operations is not broken.
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
include/hw/ppc/pnv_xscom.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h
index 3757b2cab9..38077b4796 100644
--- a/include/hw/ppc/pnv_xscom.h
+++ b/include/hw/ppc/pnv_xscom.h
@@ -54,7 +54,7 @@ typedef struct PnvXScomInterfaceClass {
* PCB SLAVE 0x110Fxxxx
*/
-#define PNV_XSCOM_EX_CORE_BASE(base, i) (base | (((uint64_t)i) << 24))
+#define PNV_XSCOM_EX_CORE_BASE(base, i) ((base) | ((uint64_t)(i) << 24))
#define PNV_XSCOM_EX_CORE_SIZE 0x100000
#define PNV_XSCOM_LPC_BASE 0xb0020
--
2.13.5
- [Qemu-devel] [PULL 12/26] ppc/kvm: change kvmppc_get_htab_fd() to return -errno on error, (continued)
- [Qemu-devel] [PULL 12/26] ppc/kvm: change kvmppc_get_htab_fd() to return -errno on error, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 06/26] ppc4xx: Add more PLB registers, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 14/26] spapr: introduce helpers to migrate HPT chunks and the end marker, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 13/26] ppc/kvm: generalize the use of kvmppc_get_htab_fd(), David Gibson, 2017/09/27
- [Qemu-devel] [PULL 09/26] ppc/mac: More rework of the DBDMA emulation, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 20/26] ppc/pnv: check for OPAL firmware file presence, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 19/26] ppc: remove all unused CPU definitions, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 21/26] spapr: fix the value of SDR1 in kvmppc_put_books_sregs(), David Gibson, 2017/09/27
- [Qemu-devel] [PULL 08/26] ppc/mac: Advertise a high clock frequency for NewWorld Macs, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 11/26] ppc: Fix OpenPIC model, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 15/26] ppc/pnv: Improve macro parenthesization,
David Gibson <=
- [Qemu-devel] [PULL 18/26] ppc: remove unused CPU definitions, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 17/26] spapr_pci: make index property mandatory, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 07/26] ppc: QOMify g3beige machine, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 25/26] macio: pass channel into MACIOIDEState via qdev property, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 23/26] mac_dbdma: QOMify, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 16/26] macio: convert pmac_ide_ops from old_mmio, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 24/26] mac_dbdma: remove DBDMA_init() function, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 22/26] mac_dbdma: remove unused IO fields from DBDMAState, David Gibson, 2017/09/27
- [Qemu-devel] [PULL 26/26] macio: use object link between MACIO_IDE and MAC_DBDMA object, David Gibson, 2017/09/27
- Re: [Qemu-devel] [PULL 00/26] ppc-for-2.11 queue 20170927, Peter Maydell, 2017/09/27