diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2019-08-02 11:16:39 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-20 20:00:41 +0000 |
commit | 7451ab9eb90b8042d01ca0b68f5a0fef63a7e96c (patch) | |
tree | 4e2123507aa9df57d06e00f8fd5f39e09d09720d | |
parent | 7470bbfae198c0efd07ece8dceac714d8ad0a6ff (diff) | |
download | chrome-ec-7451ab9eb90b8042d01ca0b68f5a0fef63a7e96c.tar.gz |
common: change clksrc_high to use STATIC_IF_NOT
This is an example of using STATIC_IF_NOT to assert a config option
when a variable wil go unused.
BUG=chromium:989786
BRANCH=none
TEST=buildall
Change-Id: I727505a26580506c04b26888030924253bb5fb2f
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1733017
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | common/timer.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/common/timer.c b/common/timer.c index 7ed3af25bf..ef960b0627 100644 --- a/common/timer.c +++ b/common/timer.c @@ -17,16 +17,8 @@ #define TIMER_SYSJUMP_TAG 0x4d54 /* "TM" */ -/* - * High word of the 64-bit timestamp counter. Not used if - * CONFIG_HWTIMER_64BIT is enabled. - */ -#ifdef CONFIG_HWTIMER_64BIT -/* Declaring as extern will cause linker errors if used */ -extern uint32_t clksrc_high; -#else -static volatile uint32_t clksrc_high; -#endif /* CONFIG_HWTIMER_64BIT */ +/* High 32-bits of the 64-bit timestamp counter. */ +STATIC_IF_NOT(CONFIG_HWTIMER_64BIT) uint32_t clksrc_high; /* Bitmap of currently running timers */ static uint32_t timer_running; |