On Thu, 28 May 2026 13:27:10 +0000, Aristo Chen <[email protected]> wrote: > diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c > index 19a6e24f38b..f4c6c4f098e 100644 > --- a/arch/arm/mach-k3/common.c > +++ b/arch/arm/mach-k3/common.c > @@ -191,6 +191,33 @@ enum k3_device_type get_device_type(void) > [ ... skip 22 lines ... ] > + name_len = strlen(name); > + suffix_len = strlen(suffix); > + if (name_len < suffix_len) > + return -EINVAL; > + > + return strcmp(name + name_len - suffix_len, suffix) ? -EINVAL : 0;
Since we already know suffix_len, a strncmp might be better here. Also the ternary is redundant since -EINVAL would still mean the 'invalid' configuration is selected. > > diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h > index 466ad22f895..37ff98d8992 100644 > --- a/arch/arm/mach-k3/common.h > +++ b/arch/arm/mach-k3/common.h > @@ -55,7 +46,6 @@ const struct k3_speed_grade_map > *k3_get_speed_grade_map(void); > void k3_fix_rproc_clock(const char *path); > void mmr_unlock(uintptr_t base, u32 partition); > bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data); > -enum k3_device_type get_device_type(void); Why the move of this function from common.h to hardware.h? This header should be accessible to all of K3 anyways. > > diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c > index 49e58ad6d6c..59201f8d2ca 100644 > --- a/board/ti/am62x/evm.c > +++ b/board/ti/am62x/evm.c > @@ -135,6 +136,13 @@ int board_late_init(void) > } > #endif > > +#if defined(CONFIG_SPL_LOAD_FIT) There's no need for the #if guard here, SPL_LOAD_FIT is enabled for all ARCH_K3 and if disabled LTO will optimize out the function anyways at build time. -- Anshul Dalal <[email protected]>

