From d6b4db159b60089c3d6e9aad993804ea319047e2 Mon Sep 17 00:00:00 2001 From: Konrad Adamczyk Date: Tue, 11 Apr 2023 10:26:12 +0000 Subject: util: Use common ARRAY_SIZE define Remove duplicated definitions of ARRAY_SIZE macro across util/ dir. Instead of duplicates, use the one from commonlib/bsd/helpers.h file. BUG=b:231765496 TEST=make -C util/cbfstool; make -C util/cbmem; make -C util/intelmetool; make -C util/superiotool Change-Id: I29b776586b4f0548d4026b2ac77095791fc9f3a3 Signed-off-by: Konrad Adamczyk Reviewed-on: https://review.coreboot.org/c/coreboot/+/74474 Reviewed-by: Jakub Czapiga Reviewed-by: Grzegorz Bernacki Reviewed-by: Robert Zieba Reviewed-by: Elyes Haouas Tested-by: build bot (Jenkins) --- util/marvell/doimage_mv/Makefile.inc | 3 ++- util/marvell/doimage_mv/doimage.h | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'util/marvell/doimage_mv') diff --git a/util/marvell/doimage_mv/Makefile.inc b/util/marvell/doimage_mv/Makefile.inc index 4020166261..3f4f528abd 100644 --- a/util/marvell/doimage_mv/Makefile.inc +++ b/util/marvell/doimage_mv/Makefile.inc @@ -1,8 +1,9 @@ ## SPDX-License-Identifier: GPL-2.0-only +TOP = $(abspath ../../..) DOIMAGE_FOLDER = marvell/doimage_mv DOIMAGE_BINARY = doimage -CFLAGS = -g -O1 -I./../inc -DMV_CPU_LE +CFLAGS = -g -O1 -I./../inc -DMV_CPU_LE -I $(TOP)/src/commonlib/bsd/include $(objutil)/$(DOIMAGE_FOLDER): mkdir -p $@ diff --git a/util/marvell/doimage_mv/doimage.h b/util/marvell/doimage_mv/doimage.h index d0000c2731..dab236b27f 100644 --- a/util/marvell/doimage_mv/doimage.h +++ b/util/marvell/doimage_mv/doimage.h @@ -19,6 +19,7 @@ disclaimer. #define _INC_DOIMAGE_H #include +#include /* use the same version as in "bootrom.inc" file */ #define VERSION_NUMBER "2.20" @@ -57,8 +58,6 @@ disclaimer. #define O_BINARY 0 #endif -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) - typedef enum { IMG_SATA, IMG_UART, -- cgit v1.2.3