diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/common.h b/include/common.h index e659044..b8a654a 100644 --- a/include/common.h +++ b/include/common.h @@ -692,8 +692,9 @@ void __attribute__((weak)) show_boot_progress (int val); #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) -#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) +#define DIV_ROUND(n,d) (((n) + ((d)/2)) / (d)) +#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) +#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1) #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) |