Implement __KERNEL_DIV_ROUND_UP() function macro in the LinuxKPI.

Submitted by:		Johannes Lundberg <johalun0@gmail.com>
MFC after:		3 days
Sponsored by:		Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2018-10-30 16:32:52 +00:00
parent 43f75d57a2
commit bf05cd05ac

View file

@ -131,6 +131,7 @@
#undef PTR_ALIGN
#define PTR_ALIGN(p, a) ((__typeof(p))ALIGN((uintptr_t)(p), (a)))
#define DIV_ROUND_UP(x, n) howmany(x, n)
#define __KERNEL_DIV_ROUND_UP(x, n) howmany(x, n)
#define DIV_ROUND_UP_ULL(x, n) DIV_ROUND_UP((unsigned long long)(x), (n))
#define FIELD_SIZEOF(t, f) sizeof(((t *)0)->f)