kernel: k_aligned_alloc: simplify assertion
Let's avoid division and modulus operations as they're costly... and even
more so when they're unnecessary as in this case the main constraint is
about the alignment being a power of 2 which is a very small subset of
sizeof(void *) multiples.
Then move the assertion to common code for wider coverage.
Signed-off-by:
Nicolas Pitre <npitre@baylibre.com>
Loading
Please sign in to comment