Furquan Shaikh (furquan@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14978
-gerrit
commit 10fe6987ca25fef05e6bb098cf9106e5eada8989 Author: Furquan Shaikh furquan@google.com Date: Thu May 26 14:41:02 2016 -0700
util/cbfstool: Include commonlib/helpers.h in common.h
This avoids re-declaring common macros like ARRAY_SIZE, MIN, MAX and ALIGN. Also removes the issues around including both files in any tool.
Change-Id: I06c763e5dd1bec97e8335499468bbdb016eb28e5 Signed-off-by: Furquan Shaikh furquan@google.com --- util/cbfstool/common.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h index ea6f3cf..d4b7021 100644 --- a/util/cbfstool/common.h +++ b/util/cbfstool/common.h @@ -22,17 +22,12 @@ #include <string.h> #include <assert.h>
+#include <commonlib/helpers.h> #include <console/console.h>
/* Endianess */ #include "swab.h"
-/* Helpers */ -#define ARRAY_SIZE(a) (int)(sizeof(a) / sizeof((a)[0])) -#define ALIGN(val, by) (((val) + (by)-1)&~((by)-1)) -#define MAX(x, y) ((x) > (y) ? (x) : (y)) -#define MIN(x, y) ((x) < (y) ? (x) : (y)) - #define IS_TOP_ALIGNED_ADDRESS(x) ((uint32_t)(x) > 0x80000000)
#define unused __attribute__((unused))