summaryrefslogtreecommitdiff
path: root/lib/utils/timer/aclint_mtimer.c
diff options
context:
space:
mode:
authorPetro Karashchenko <[email protected]>2022-01-28 09:13:23 +0200
committerAnup Patel <[email protected]>2022-02-04 11:04:19 +0530
commit6ad8917b7e27e5e80fb9268492b9111b17ed2024 (patch)
treed8af3fafb149bdcc42b7d8905940b846b135fdfc /lib/utils/timer/aclint_mtimer.c
parent5d53b55aa77ffeefd4012445dfa6ad3535e1ff2c (diff)
lib: fix compilation when strings.h is included
In a systems that provide strings.h and it is included together with sbi_bitops.h the compilation error appears. The ffs() and fls() are provided by strings.h Signed-off-by: Petro Karashchenko <[email protected]> Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib/utils/timer/aclint_mtimer.c')
-rw-r--r--lib/utils/timer/aclint_mtimer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/timer/aclint_mtimer.c b/lib/utils/timer/aclint_mtimer.c
index 2532b638..a957b1ca 100644
--- a/lib/utils/timer/aclint_mtimer.c
+++ b/lib/utils/timer/aclint_mtimer.c
@@ -154,7 +154,7 @@ static int aclint_mtimer_add_regions(unsigned long addr, unsigned long size)
while (pos < end) {
rsize = pos & (MTIMER_ADD_REGION_ALIGN - 1);
if (rsize)
- rsize = 1UL << __ffs(pos);
+ rsize = 1UL << sbi_ffs(pos);
else
rsize = ((end - pos) < MTIMER_ADD_REGION_ALIGN) ?
(end - pos) : MTIMER_ADD_REGION_ALIGN;