[Sound-open-firmware] [PATCH 10/15] [RFC][v2]DMIC: Add min/max, ceil divide, find number, and normalize utils
Liam Girdwood
liam.r.girdwood at linux.intel.com
Mon May 7 13:19:59 CEST 2018
On Fri, 2018-05-04 at 18:01 +0300, Seppo Ingalsuo wrote:
> +
> +/* This is a divide function that returns ceil of the quotient.
> + * E.g. ceil_divide(9, 3) returns 3, ceil_divide(10, 3) returns 4.
> + */
> +int ceil_divide(int a, int b)
> +{
> + int c;
> +
> + c = a / b;
> + if (c * b < a)
> + c++;
> +
> + return c;
> +}
This one should be static inline.
Liam
More information about the Sound-open-firmware
mailing list