command: Include a required header in command.h
PATCH v5 39/43 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 <[email protected]>
---
Changes in v5:
- Adjust so this builds on azure
boot/bootm.c | 2 +- include/command.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
boot/bootm.c +1 -1
@@ -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>
include/command.h +4 -0
@@ -25,6 +25,10 @@#endif #ifndef __ASSEMBLY__ + +/* For ARRAY_SIZE() */ +#include <linux/kernel.h> +/* * Monitor Command Table */
Signature · 1 line
2.42.0.515.g380fc7ccd1-goog
Quoted 4 lines · Simon Glass
This uses
ARRAY_SIZE()but does not include the header file which declares it. Fix this, so thatcommand.hcan be included withoutcommon.hSigned-off-by Simon Glass <[email protected]>
Reviewed-by Mattijs Korpershoek <[email protected]>
Quoted 46 lines
---
Changes in v5:
- Adjust so this builds on azureboot/bootm.c | 2 +- include/command.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)boot/bootm.c +1
-1@@ -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> include/command.h +4
-0@@ -25,6 +25,10 @@#endif #ifndef __ASSEMBLY__ + +/* For ARRAY_SIZE() */ +#include <linux/kernel.h> +/* * Monitor Command Table */ Signature · 1 line
2.42.0.515.g380fc7ccd1-goog
Quoted 5 lines · Simon Glass
This uses
ARRAY_SIZE()but does not include the header file which declares it. Fix this, so thatcommand.hcan be included withoutcommon.hSigned-off-by Simon Glass <[email protected]>Reviewed-by Mattijs Korpershoek <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom