From: Simon Glass <sjg@chromium.org> Date: Wed, 27 Sep 2023 14:22:37 +0000 (-0600) Subject: command: Include a required header in command.h X-Git-Tag: v2025.01-rc5-pxa1908~840^2~4 X-Git-Url: http://git.dujemihanovic.xyz/img/static/html/%7B%7B?a=commitdiff_plain;h=be5951461c23111b343348401defd1d05227a75e;p=u-boot.git command: Include a required header in command.h This uses ARRAY_SIZE() but does not include the header file which declares it. Fix this, so that command.h can be included without common.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> --- diff --git a/boot/bootm.c b/boot/bootm.c index b1c3afe0a3..8f96a80d42 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -8,6 +8,7 @@ #include <common.h> #include <bootstage.h> #include <cli.h> +#include <command.h> #include <cpu_func.h> #include <env.h> #include <errno.h> @@ -29,7 +30,6 @@ #include "mkimage.h" #endif -#include <command.h> #include <bootm.h> #include <image.h> diff --git a/include/command.h b/include/command.h index ae7bb4a30b..34ea989b39 100644 --- a/include/command.h +++ b/include/command.h @@ -25,6 +25,10 @@ #endif #ifndef __ASSEMBLY__ + +/* For ARRAY_SIZE() */ +#include <linux/kernel.h> + /* * Monitor Command Table */