On 3/16/20 9:06 AM, Philippe Mathieu-Daudé wrote: > +static const ARMCPUInfo arm_v4_cpus[] = { > + { .name = "ti925t", .initfn = ti925t_initfn }, > + { .name = "sa1100", .initfn = sa1100_initfn }, > + { .name = "sa1110", .initfn = sa1110_initfn }, > + { .name = NULL } > +}; > + > +static void arm_v4_cpu_register_types(void) > +{ > + const ARMCPUInfo *info = arm_v4_cpus; > + > + while (info->name) { > + arm_cpu_register(info); > + info++; > + } > +}
I much prefer ARRAY_SIZE() to sentinels. I know the existing code make much use of them, but we don't need to replicate that here. r~