summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/clock.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clock.h b/include/clock.h
index 8e07c35d37..03a38911a7 100644
--- a/include/clock.h
+++ b/include/clock.h
@@ -4,8 +4,9 @@
#include <types.h>
#include <linux/time.h>
+#include <linux/bitops.h>
-#define CLOCKSOURCE_MASK(bits) (uint64_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
+#define CLOCKSOURCE_MASK(bits) GENMASK_ULL((bits) - 1, 0)
struct clocksource {
uint32_t shift;