[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZlnEF4F5Vih4ygZC@infradead.org>
Date: Fri, 31 May 2024 05:35:35 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Zhang Yi <yi.zhang@...weicloud.com>
Cc: linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, djwong@...nel.org, hch@...radead.org,
brauner@...nel.org, david@...morbit.com, chandanbabu@...nel.org,
jack@...e.cz, willy@...radead.org, yi.zhang@...wei.com,
chengzhihao1@...wei.com, yukuai3@...wei.com
Subject: Re: [RFC PATCH v4 2/8] math64: add rem_u64() to just return the
remainder
> +#ifndef rem_u64
> +static inline u32 rem_u64(u64 dividend, u32 divisor)
> +{
> + if (is_power_of_2(divisor))
> + return dividend & (divisor - 1);
> + return do_div(dividend, divisor);
> +}
> +#endif
This ifndef seems superflous.
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists