Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69439 )
Change subject: util/amdfwtool: Remove duplicate ALIGN and ARRAY_SIZE definition ......................................................................
util/amdfwtool: Remove duplicate ALIGN and ARRAY_SIZE definition
ALIGN and ARRAY_SIZE macros are already defined as part of commonlib/bsd/helpers.h. Include the header and remove the duplicate definitions in amdfwtool.
BUG=None TEST=Build amdfwtool. Build BIOS image for Skyrim.
Change-Id: Iabff06fa47a1badb0ce9815261117916664f3e03 Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M util/amdfwtool/amdfwtool.c M util/amdfwtool/amdfwtool.h 2 files changed, 18 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/69439/1
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index 389be9f..d69bbd7 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -65,7 +65,6 @@ #define AMD_ROMSIG_OFFSET 0x20000 #define MIN_ROM_KB 256
-#define ALIGN(val, by) (((val) + (by) - 1) & ~((by) - 1)) #define _MAX(A, B) (((A) > (B)) ? (A) : (B)) #define ERASE_ALIGNMENT 0x1000U #define TABLE_ALIGNMENT 0x1000U diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h index 81f0bfb..2e0f1fa 100644 --- a/util/amdfwtool/amdfwtool.h +++ b/util/amdfwtool/amdfwtool.h @@ -4,6 +4,7 @@ #define _AMD_FW_TOOL_H_
#include <commonlib/bsd/compiler.h> +#include <commonlib/bsd/helpers.h> #include <openssl/sha.h> #include <stdint.h> #include <stdbool.h> @@ -363,6 +364,4 @@ #define LINE_EOF (1) #define LINE_TOO_LONG (2)
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) - #endif /* _AMD_FW_TOOL_H_ */