Messages in this thread | | | Subject | Re: [PATCH 3/7] hwmon/coretemp: Handle large core id value | From | Zhang Rui <> | Date | Sun, 14 Aug 2022 01:24:01 +0800 |
| |
Hi, Guenter,
On Fri, 2022-08-12 at 10:16 -0700, Guenter Roeck wrote: > > > - /* The core id is too big, just return */ > > - indx = TO_ATTR_NO(cpu); > > - if (indx > MAX_CORE_DATA - 1) > > + pd = platform_get_drvdata(pdev); > > + > > + for (i = 0; i < NUM_REAL_CORES; i++) { > > + if (pd->cpu_map[i] == topology_core_id(cpu)) { > > + indx = i + BASE_SYSFS_ATTR_NO; > > + break; > > + } > > + } > > + > > + /* Too many cores and this core is not pupolated, just > > return */ > > populated > > Other than that looks good. > > Acked-by: Guenter Roeck <linux@roeck-us.net>
Thanks for reviewing, will fix in next version.
thanks, rui
| |