summaryrefslogtreecommitdiff
path: root/chip/ish/system_state_subsys.c
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2019-04-15 11:14:41 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-04-24 15:52:08 -0700
commitd2ac74c21848c1cec16d5e72d28f93eb15c5d869 (patch)
tree729d55380b5edd52890c39f1730492a7e7748712 /chip/ish/system_state_subsys.c
parent2ece52589486990cca666dc3ebc4164d5f2c0aed (diff)
downloadchrome-ec-d2ac74c21848c1cec16d5e72d28f93eb15c5d869.tar.gz
ish: refactor bit-mask constants to use BIT macro
We should be using the BIT(n) macro rather than (1 << n), as it prevents errors, and makes the intended purpose a little bit easier to read. BRANCH=none BUG=none TEST=make buildall -j Change-Id: Ia727ac2f8e5abfb852ba78d5cba19d7c8af72839 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1567688 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'chip/ish/system_state_subsys.c')
-rw-r--r--chip/ish/system_state_subsys.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/chip/ish/system_state_subsys.c b/chip/ish/system_state_subsys.c
index 81a0a6d7b7..5a0fe582b5 100644
--- a/chip/ish/system_state_subsys.c
+++ b/chip/ish/system_state_subsys.c
@@ -22,12 +22,12 @@
/* the following "define"s and structures are from host driver
* and they are slightly modified for look&feel purpose.
*/
-#define SYSTEM_STATE_SUBSCRIBE 0x1
-#define SYSTEM_STATE_STATUS 0x2
-#define SYSTEM_STATE_QUERY_SUBSCRIBERS 0x3
-#define SYSTEM_STATE_STATE_CHANGE_REQ 0x4
+#define SYSTEM_STATE_SUBSCRIBE 0x1
+#define SYSTEM_STATE_STATUS 0x2
+#define SYSTEM_STATE_QUERY_SUBSCRIBERS 0x3
+#define SYSTEM_STATE_STATE_CHANGE_REQ 0x4
-#define SUSPEND_STATE_BIT (1<<1) /* suspend/resume */
+#define SUSPEND_STATE_BIT BIT(1) /* suspend/resume */
/* Cached state of ISH's requested power rails when AP suspends */
#ifdef CHIP_FAMILY_ISH5