summaryrefslogtreecommitdiff
path: root/src/ec/kontron/kempld
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-05-26 14:19:09 +0200
committerWerner Zeh <werner.zeh@siemens.com>2021-05-28 10:05:15 +0000
commitf696d797dcc162e8ed27a6720d1253f00a5f0128 (patch)
tree2752c6256a8faba87046dc5035e4c20b23598d1d /src/ec/kontron/kempld
parente7266e8393590c5e9012e0f169a99fa4a86ec9db (diff)
ec/kontron/kempld: Guard macro parameters
Add parentheses around macro parameters to avoid operation order issues. Change-Id: I2d4552abaeda5702619cc53e9dfae1f17b048e67 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/54952 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/ec/kontron/kempld')
-rw-r--r--src/ec/kontron/kempld/kempld_internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ec/kontron/kempld/kempld_internal.h b/src/ec/kontron/kempld/kempld_internal.h
index 014778c1cc..993fe8edd1 100644
--- a/src/ec/kontron/kempld/kempld_internal.h
+++ b/src/ec/kontron/kempld/kempld_internal.h
@@ -12,8 +12,8 @@
/* indexed registers */
#define KEMPLD_SPEC 0x06
-#define KEMPLD_SPEC_GET_MINOR(x) (x & 0x0f)
-#define KEMPLD_SPEC_GET_MAJOR(x) (x >> 4 & 0x0f)
+#define KEMPLD_SPEC_GET_MINOR(x) ((x) & 0x0f)
+#define KEMPLD_SPEC_GET_MAJOR(x) ((x) >> 4 & 0x0f)
#define KEMPLD_CFG 0x37
#define KEMPLD_CFG_GPIO_I2C_MUX (1 << 0)