From 677ac698680f31a83086245f3b741dcb79da6fc4 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Sat, 27 Mar 2021 13:54:46 +0100 Subject: nb/intel/gm45/gm45.h: Guard `CxDRC1_NOTPOP` macro parameters Wrap `r` in parentheses to avoid unexpected behavior with compound expressions. Fortunately, all uses of this macro do not cause issues. Tested with BUILD_TIMELESS=1, Roda RK9 remains identical. Change-Id: Id0f05a507c5e7e8c50e9765261d86bae73c7b5a6 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/51879 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/northbridge/intel/gm45/gm45.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/northbridge/intel/gm45') diff --git a/src/northbridge/intel/gm45/gm45.h b/src/northbridge/intel/gm45/gm45.h index b6e7c2f2b1..d610f317e4 100644 --- a/src/northbridge/intel/gm45/gm45.h +++ b/src/northbridge/intel/gm45/gm45.h @@ -294,7 +294,7 @@ enum { #define CxDRC1_SSDS_MASK (0xff << CxDRC1_SSDS_SHIFT) #define CxDRC1_DS (0x91 << CxDRC1_SSDS_SHIFT) #define CxDRC1_SS (0xb1 << CxDRC1_SSDS_SHIFT) -#define CxDRC1_NOTPOP(r) (1 << (16 + r)) /* Write 1 for Not Populated */ +#define CxDRC1_NOTPOP(r) (1 << (16 + (r))) /* Write 1 for Not Populated */ #define CxDRC1_NOTPOP_MASK (0xf << 16) #define CxDRC1_MUSTWR (3 << 11) -- cgit v1.2.3