From bb266fc26fc05d4ab22de6ad7bce5b477c9f9140 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Mon, 11 Mar 2019 15:57:52 -0700 Subject: common: replace 1 << digits, with BIT(digits) Requested for linux integration, use BIT instead of 1 << First step replace bit operation with operand containing only digits. Fix an error in motion_lid try to set bit 31 of a signed integer. BUG=None BRANCH=None TEST=compile Change-Id: Ie843611f2f68e241f0f40d4067f7ade726951d29 Signed-off-by: Gwendal Grignou Reviewed-on: https://chromium-review.googlesource.com/1518659 Reviewed-by: Daisuke Nojiri --- chip/lm4/watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chip/lm4/watchdog.c') diff --git a/chip/lm4/watchdog.c b/chip/lm4/watchdog.c index 583ace0582..e7ff5e2e83 100644 --- a/chip/lm4/watchdog.c +++ b/chip/lm4/watchdog.c @@ -101,7 +101,7 @@ int watchdog_init(void) LM4_WATCHDOG_LOCK(0) = LM4_WATCHDOG_MAGIC_WORD; /* De-activate the watchdog when the JTAG stops the CPU */ - LM4_WATCHDOG_TEST(0) |= 1 << 8; + LM4_WATCHDOG_TEST(0) |= BIT(8); /* Reset after 2 time-out, activate the watchdog and lock the control * register. */ -- cgit v1.2.1