diff --git a/include/linux/damon.h b/include/linux/damon.h index 3e91a597a1aadb4fefe4dbc4a8e327f7e7e7bb83..e2c8152985b7dcadb49e7638deceacf749524473 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -19,7 +19,10 @@ #define DAMOS_MAX_SCORE (99) /* Get a random number in [l, r) */ -#define damon_rand(l, r) (l + prandom_u32_max(r - l)) +static inline unsigned long damon_rand(unsigned long l, unsigned long r) +{ + return l + prandom_u32_max(r - l); +} /** * struct damon_addr_range - Represents an address region of [@start, @end).