diff options
author | Eric Blake <eblake@redhat.com> | 2017-09-19 09:16:03 -0500 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-09-27 13:05:41 +1000 |
commit | 5261158d21994d38e9e5cf3305691614fc2b1e09 (patch) | |
tree | e752aac47daac7696d69e7b6ef8a1d73e18d7c48 /include/hw | |
parent | 332f7721cbee06d3720d4e2827c10a8b84d8ec19 (diff) |
ppc/pnv: Improve macro parenthesization
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 <eblake@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/ppc/pnv_xscom.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 |