summaryrefslogtreecommitdiff
path: root/include/compile_time_macros.h
diff options
context:
space:
mode:
authorEvan Green <evgreen@chromium.org>2019-10-01 13:39:24 -0700
committerCommit Bot <commit-bot@chromium.org>2019-10-05 00:47:56 +0000
commit1d82a0592eedcfdaf666111a4ff8e6a9665fa014 (patch)
tree02d30616c04b4e945647dacfb6d254223a593a9f /include/compile_time_macros.h
parent3247d52abeb0ccacc49f0d18dadf47c77f8f0177 (diff)
downloadchrome-ec-1d82a0592eedcfdaf666111a4ff8e6a9665fa014.tar.gz
include: De-longify BIT() macro
The BIT() macro was recently introduced to make things more comfortable to upstream Linux. However, there's no need for it to be a long. Change the macro back to being an int (int and long are the same on 32-bit platforms, which all of our ECs are), so that we can reduce the number of %l specifiers. The semantics of %l have changed, we are deprecating its use on master to reduce the risk that we accidentally cherry-pick one of those printfs to an old firmware branch. BUG=chromium:984041 TEST=make -j buildall BRANCH=None Change-Id: I95b9cd49895cc67998dcb1de9bab5b5591d93243 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1834601 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'include/compile_time_macros.h')
-rw-r--r--include/compile_time_macros.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/compile_time_macros.h b/include/compile_time_macros.h
index a400736727..8565a3605d 100644
--- a/include/compile_time_macros.h
+++ b/include/compile_time_macros.h
@@ -38,7 +38,7 @@
/*
* Bit operation macros.
*/
-#define BIT(nr) (1UL << (nr))
+#define BIT(nr) (1U << (nr))
#define BIT_ULL(nr) (1ULL << (nr))
#endif /* __CROS_EC_COMPILE_TIME_MACROS_H */