diff options
author | Furquan Shaikh <furquan@google.com> | 2016-05-26 14:41:02 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2016-05-28 08:48:45 +0200 |
commit | 161d2334e863b26fc893c6bbf8f8cb8b811ce586 (patch) | |
tree | cb88004bafdf0691e4cac9dfa599538b2b4bddbd /util/cbfstool/common.h | |
parent | 559e947306d9a8684f7c0879c122a9b3b3f87c16 (diff) |
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.
Also, fix comparison error in various files by replacing int with
size_t.
Change-Id: I06c763e5dd1bec97e8335499468bbdb016eb28e5
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/14978
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'util/cbfstool/common.h')
-rw-r--r-- | util/cbfstool/common.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h index ea6f3cf06c..d4b7021428 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)) |