diff options
| author | Tom Rini <[email protected]> | 2023-09-06 11:00:42 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-09-06 13:47:54 -0400 |
| commit | 86f4e84c295542569bcdef767b2c817980efee6e (patch) | |
| tree | aecd784cfc1f99b7018b2a3e214add1fb6a380fc | |
| parent | 98b35c7fdba4e813b2275ea5e6a34b67a66ea9c1 (diff) | |
| parent | 96912a9c7ca5866dcfd9464640681338fc6a7927 (diff) | |
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh into next
- rmobile cleanup
| -rw-r--r-- | arch/arm/mach-rmobile/cpu_info.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c index 7651e43bd0f..6804b1da2cd 100644 --- a/arch/arm/mach-rmobile/cpu_info.c +++ b/arch/arm/mach-rmobile/cpu_info.c @@ -83,14 +83,15 @@ static const struct { static int rmobile_cpuinfo_idx(void) { - int i = 0; u32 cpu_type = rmobile_get_cpu_type(); + int i; - for (; i < ARRAY_SIZE(rmobile_cpuinfo) - 1; i++) + for (i = 0; i < ARRAY_SIZE(rmobile_cpuinfo) - 1; i++) if (rmobile_cpuinfo[i].cpu_type == cpu_type) - break; + return i; - return i; + /* Unknown "CPU" entry */ + return ARRAY_SIZE(rmobile_cpuinfo) - 1; } static const u8 *get_cpu_name(int idx) |
