summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Yeong <joshua.yeong@starfivetech.com>2026-08-14 13:39:18 +0300
committerAndy Hu <andy.hu@starfivetech.com>2026-09-02 18:15:00 +0300
commit7cb1baf7e8a111334d7dc0b10e924c37b2d53599 (patch)
tree5ef116d30d8e33e0fd92852f02f25285355c61fc
parent5d51eb37a733ac3b3c62f62c97a08eb1d90b6e99 (diff)
downloadu-boot-starfive-2024.07-master-jhb100.tar.xz
board: starfive: jhb100: build FDT partition helpers only when usedREL_JHB100_2024.07_SDK_1.11.0-GAstarfive-2024.07-master-jhb100
update_partition_reg() and rename_partition_by_offset() are called only from the SFC_AGT and SFC_AB_RENAME_RESIZE fixups. The AB defconfigs select SWAP_PARTITION instead, so both helpers compile to dead static functions and GCC warns with -Wunused-function. starfive-jhb100.c:142:12: warning: 'rename_partition_by_offset' defined but not used [-Wunused-function] starfive-jhb100.c:114:12: warning: 'update_partition_reg' defined but not used [-Wunused-function] Signed-off-by: Joshua Yeong <joshua.yeong@starfivetech.com>
-rwxr-xr-xboard/starfive/jhb100/starfive-jhb100.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/board/starfive/jhb100/starfive-jhb100.c b/board/starfive/jhb100/starfive-jhb100.c
index a02576f1c8..5f420faef7 100755
--- a/board/starfive/jhb100/starfive-jhb100.c
+++ b/board/starfive/jhb100/starfive-jhb100.c
@@ -111,6 +111,9 @@ enum env_location env_get_location(enum env_operation op, int prio)
return ENVL_NOWHERE;
}
+#if defined(CONFIG_STARFIVE_JHB100_SFC_AGT) || \
+ defined(CONFIG_STARFIVE_JHB100_SFC_AB_RENAME_RESIZE)
+
static int update_partition_reg(void *fdt, int flash_off,
const char *label, uint32_t offset, uint32_t size)
{
@@ -169,6 +172,10 @@ static int rename_partition_by_offset(void *fdt, int flash_off,
return -ENOENT;
}
+#endif /* CONFIG_STARFIVE_JHB100_SFC_AGT ||
+ * CONFIG_STARFIVE_JHB100_SFC_AB_RENAME_RESIZE
+ */
+
#ifdef CONFIG_STARFIVE_JHB100_SFC_AGT
int jhb100_fdt_sfc_fixup_agt(void *fdt)
{