From: Jens Axboe Date: Mon, 14 Apr 2014 19:13:21 +0000 (-0600) Subject: Fix is_power_of_2() for longs X-Git-Tag: fio-2.1.9~28 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;ds=inline;h=088b17c58d11bab0aa17be2fb2797632e1518281;p=fio.git Fix is_power_of_2() for longs Signed-off-by: Jens Axboe --- diff --git a/fio.h b/fio.h index 25f6052b..544916f2 100644 --- a/fio.h +++ b/fio.h @@ -588,7 +588,7 @@ static inline unsigned int td_min_bs(struct thread_data *td) return min(td->o.min_bs[DDIR_TRIM], min_bs); } -static inline int is_power_of_2(unsigned int val) +static inline int is_power_of_2(unsigned long val) { return (val != 0 && ((val & (val - 1)) == 0)); }