From 0b8c51eaad9d3293aa77cf64cf56742fb2ccf1ed Mon Sep 17 00:00:00 2001 From: "Mike Rapoport (IBM)" Date: Wed, 25 May 2022 20:04:59 +0300 Subject: [PATCH] compiler: add ALIGN_DOWN macro Signed-off-by: Mike Rapoport (IBM) --- include/common/compiler.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/common/compiler.h b/include/common/compiler.h index 1347b6236..3e66709f9 100644 --- a/include/common/compiler.h +++ b/include/common/compiler.h @@ -89,6 +89,7 @@ #define round_down(x, y) ((x) & ~__round_mask(x, y)) #define DIV_ROUND_UP(n, d) (((n) + (d)-1) / (d)) #define ALIGN(x, a) (((x) + (a)-1) & ~((a)-1)) +#define ALIGN_DOWN(x, a) ALIGN((x) - ((a) - 1), (a)) #define min(x, y) \ ({ \