Re: [RFC PATCH v4 2/8] math64: add rem_u64() to just return the remainder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +#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@xxxxxx>




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux