[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 15/26] ppc/pnv: Improve macro parenthesization
From: |
David Gibson |
Subject: |
[Qemu-ppc] [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-ppc] [PULL 00/26] ppc-for-2.11 queue 20170927, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 03/26] ohci: Allow sysbus version to be used as a companion, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 04/26] ehci: Add ppc4xx-ehci for the USB 2.0 controller in embedded PPC SoCs, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 02/26] ppc/kvm: drop kvmppc_has_cap_htab_fd(), David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 06/26] ppc4xx: Add more PLB registers, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 08/26] ppc/mac: Advertise a high clock frequency for NewWorld Macs, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 18/26] ppc: remove unused CPU definitions, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 15/26] ppc/pnv: Improve macro parenthesization,
David Gibson <=
- [Qemu-ppc] [PULL 10/26] ppc/ide/macio: Add missing registers, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 05/26] ppc: Add 460EX embedded CPU, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 11/26] ppc: Fix OpenPIC model, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 01/26] ppc/kvm: check some capabilities with kvm_vm_check_extension(), David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 09/26] ppc/mac: More rework of the DBDMA emulation, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 07/26] ppc: QOMify g3beige machine, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 17/26] spapr_pci: make index property mandatory, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 25/26] macio: pass channel into MACIOIDEState via qdev property, David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 13/26] ppc/kvm: generalize the use of kvmppc_get_htab_fd(), David Gibson, 2017/09/27
- [Qemu-ppc] [PULL 24/26] mac_dbdma: remove DBDMA_init() function, David Gibson, 2017/09/27