From 03199f999452d543e051c7c41ef3845c72474bae Mon Sep 17 00:00:00 2001 From: "Charles E. Youse" Date: Wed, 8 May 2019 13:24:51 -0700 Subject: [PATCH] include/sys_clock.h: consolidate identical branches in __ticks_to_ms The two branches of the compile-time conditional are identical, so they are consolidated and the conditional removed. Just hygiene again. No functional change. Signed-off-by: Charles E. Youse --- include/sys_clock.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/include/sys_clock.h b/include/sys_clock.h index 0f485a77118..10e9def43ff 100644 --- a/include/sys_clock.h +++ b/include/sys_clock.h @@ -121,15 +121,8 @@ static ALWAYS_INLINE s32_t z_ms_to_ticks(s32_t ms) static inline u64_t __ticks_to_ms(s64_t ticks) { #ifdef CONFIG_SYS_CLOCK_EXISTS - -#ifdef _NEED_PRECISE_TICK_MS_CONVERSION - /* use 64-bit math to keep precision */ - return (u64_t)ticks * MSEC_PER_SEC / (u64_t)CONFIG_SYS_CLOCK_TICKS_PER_SEC; -#else - /* simple multiplication keeps precision */ - return (u64_t)ticks * MSEC_PER_SEC / (u64_t)CONFIG_SYS_CLOCK_TICKS_PER_SEC; -#endif - + return (u64_t)ticks * MSEC_PER_SEC / + (u64_t)CONFIG_SYS_CLOCK_TICKS_PER_SEC; #else __ASSERT(ticks == 0, "ticks not zero"); return 0ULL;