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 <konrada@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74474 Reviewed-by: Jakub Czapiga <jacz@semihalf.com> Reviewed-by: Grzegorz Bernacki Reviewed-by: Robert Zieba <robertzieba@google.com> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Felix Held
parent
9203f5ee85
commit
d6b4db159b
@@ -2,10 +2,12 @@
|
||||
|
||||
PROGRAM = intelmetool
|
||||
|
||||
TOP ?= $(abspath ../..)
|
||||
CC ?= gcc
|
||||
INSTALL ?= /usr/bin/env install
|
||||
PREFIX ?= /usr/local
|
||||
CFLAGS ?= -O0 -g -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function
|
||||
CFLAGS ?= -O0 -g -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function \
|
||||
-I $(TOP)/src/commonlib/bsd/include
|
||||
LDFLAGS += -lpci -lz
|
||||
|
||||
OBJS = intelmetool.o me.o me_status.o mmap.o rcba.o msr.o
|
||||
|
@@ -1,10 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <commonlib/bsd/helpers.h>
|
||||
#include "me.h"
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
||||
|
||||
/* HFS1[3:0] Current Working State Values */
|
||||
static const char *me_cws_values[] = {
|
||||
[ME_HFS_CWS_RESET] = "Reset",
|
||||
|
Reference in New Issue
Block a user