Messages in this thread | | | Subject | Re: [PATCH 1/4] drivers core: Introduce CPU type sysfs interface | From | Randy Dunlap <> | Date | Fri, 2 Oct 2020 20:27:41 -0700 |
| |
On 10/2/20 6:17 PM, Ricardo Neri wrote: > +/** > + * arch_get_cpu_type() - Get the CPU type number > + * @cpu: Index of the CPU of which the index is needed > + * > + * Get the CPU type number of @cpu, a non-zero unsigned 32-bit number that
Are you sure that @cpu is non-zero?
> + * uniquely identifies a type of CPU micro-architecture. All CPUs of the same > + * type have the same type number. Type numbers are defined by each CPU > + * architecture. > + */ > +u32 __weak arch_get_cpu_type(int cpu) > +{ > + return 0; > +}
arch_get_cpu_type() in patch 4/4 allows @cpu to be 0.
-- ~Randy
| |