diff --git a/src/include/sof/math/numbers.h b/src/include/sof/math/numbers.h index 5e314aa2c..6ecfc9024 100644 --- a/src/include/sof/math/numbers.h +++ b/src/include/sof/math/numbers.h @@ -18,6 +18,12 @@ */ #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) < (b) ? (b) : (a)) + +#define ROUND_DOWN(size, alignment) ({ \ + typeof(size) __size = (size); \ + typeof(alignment) __alignment = (alignment); \ + __size - (__size % __alignment); \ +}) #endif /* ! __ZEPHYR__ */ #define ABS(a) ({ \ @@ -29,13 +35,7 @@ __a < 0 ? -1 : \ __a > 0 ? 1 : 0; \ }) -#ifndef ROUND_DOWN -#define ROUND_DOWN(size, alignment) ({ \ - typeof(size) __size = (size); \ - typeof(alignment) __alignment = (alignment); \ - __size - (__size % __alignment); \ -}) -#endif /* !ROUND_DOWN */ + int gcd(int a, int b); /* Calculate greatest common divisor for a and b */ /* This is a divide function that returns ceil of the quotient.