[PATCH 04/17] board: ti: j721e: Guard functions with right #ifdef to avoid build warnings
Sinthu Raja
sinthu.raja at mistralsolutions.com
Sat Jun 26 16:55:49 CEST 2021
From: Amarnath MB <amarnath.mb at ti.com>
board_late_init(), setup_board_eeprom_env() and setup_serial() is
called only under CONFIG_BOARD_LATE_INIT, so guard these functions
with the same.
Signed-off-by: Amarnath MB <amarnath.mb at ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja at ti.com>
---
board/ti/j721e/evm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index b9a9f19552..23e739bcd3 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -170,6 +170,7 @@ int checkboard(void)
return 0;
}
+#ifdef CONFIG_BOARD_LATE_INIT
static void setup_board_eeprom_env(void)
{
char *name = "j721e";
@@ -208,6 +209,7 @@ static void setup_serial(void)
snprintf(serial_string, sizeof(serial_string), "%016lx", board_serial);
env_set("serial#", serial_string);
}
+#endif
/*
* Declaration of daughtercards to probe. Note that when adding more
@@ -384,6 +386,7 @@ static int probe_daughtercards(void)
}
#endif
+#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{
if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) {
@@ -396,6 +399,7 @@ int board_late_init(void)
return 0;
}
+#endif
void spl_board_init(void)
{
--
2.31.1
More information about the U-Boot
mailing list