From 5e2548c1d6e0331edbf94edcfc95d55b5e9a6cab Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Tue, 2 Aug 2022 10:21:35 +0200 Subject: lmb: Fix LMB_MEMORY_REGIONS flag usage This patch is fixing a broken boot observed on stm32mp157c-dk2 board. IS_ENABLED macro should be used to check if a compilation flag is set to "y" or "m". LMB_MEMORY_REGIONS is set to a numerical value, IS_ENABLED macro is not suitable in this case. Fixes: 7c1860fce4e3 ("lmb: Fix lmb property's defination under struct lmb") Signed-off-by: Patrice Chotard Acked-by: Michal Simek Reviewed-by: Tom Rini --- include/lmb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/lmb.h b/include/lmb.h index 1476d78c282..7298c2ccc40 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -68,7 +68,7 @@ struct lmb_region { struct lmb { struct lmb_region memory; struct lmb_region reserved; -#if IS_ENABLED(CONFIG_LMB_MEMORY_REGIONS) +#ifdef CONFIG_LMB_MEMORY_REGIONS struct lmb_property memory_regions[CONFIG_LMB_MEMORY_REGIONS]; struct lmb_property reserved_regions[CONFIG_LMB_RESERVED_REGIONS]; #endif -- cgit v1.2.3 From 8b8accb8bf2a5d6dc02b801281dac19214b85b84 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 1 Aug 2022 15:17:49 +0200 Subject: cmd: inconsistent return type of command_process() The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- include/command.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/command.h b/include/command.h index 44c91f655d4..8917da8b21c 100644 --- a/include/command.h +++ b/include/command.h @@ -229,10 +229,10 @@ enum command_ret_t { * is left unchanged. * @param ticks If ticks is not null, this function set it to the * number of ticks the command took to complete. - * Return: 0 if the command succeeded, 1 if it failed + * Return: 0 if command succeeded, else non-zero (CMD_RET_...) */ -int cmd_process(int flag, int argc, char *const argv[], int *repeatable, - unsigned long *ticks); +enum command_ret_t cmd_process(int flag, int argc, char *const argv[], + int *repeatable, unsigned long *ticks); void fixup_cmdtable(struct cmd_tbl *cmdtp, int size); -- cgit v1.2.3 From 4e4bf9449b4f436419490a4a8cf4de17433cac15 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 31 Jul 2022 12:28:48 -0600 Subject: common: Drop display_options.h from common header Move this out of the common header and include it only where needed. Signed-off-by: Simon Glass --- include/common.h | 1 - include/display_options.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/common.h b/include/common.h index 71df59bca0e..25c317f4439 100644 --- a/include/common.h +++ b/include/common.h @@ -23,7 +23,6 @@ #include #include #include /* boot information for Linux kernel */ -#include #include #endif /* __ASSEMBLY__ */ diff --git a/include/display_options.h b/include/display_options.h index 33fcbb85335..85dacbc7590 100644 --- a/include/display_options.h +++ b/include/display_options.h @@ -19,6 +19,7 @@ * @size: Size to print * @suffix String to print after the size */ +#include void print_size(uint64_t size, const char *suffix); /** -- cgit v1.2.3