RE: [PATCH 1/1] hwmon: coretemp: use dynamically allocated array to store per core data

2015-09-18 Thread Odzioba, Lukasz
On 09/11/2015 04:28 AM, Guenter Roeck wrote: > You can return NULL but never check for this condition in the calling code. > The only time you check in the calling code is when you want to know > if pdata->core_data[index] is NULL, which is distinctly different. > As such, this check does not reall

Re: [PATCH 1/1] hwmon: coretemp: use dynamically allocated array to store per core data

2015-09-11 Thread Guenter Roeck
On 09/11/2015 06:56 AM, Lukasz Odzioba wrote: Removes arbitrary limit of supported CPU cores and max core ID. Replaces fixed size array storing per core information with dynamically allocated one. Currently coretemp is not able to handle cores with core ID greater than 32. Such attempt ends up

[PATCH 1/1] hwmon: coretemp: use dynamically allocated array to store per core data

2015-09-11 Thread Lukasz Odzioba
Removes arbitrary limit of supported CPU cores and max core ID. Replaces fixed size array storing per core information with dynamically allocated one. Currently coretemp is not able to handle cores with core ID greater than 32. Such attempt ends up with the following error in dmesg: coretemp core

hwmon: coretemp: use dynamically allocated array to store per core data

2015-09-11 Thread Lukasz Odzioba
This patch is continuation of my previous work. After Guenter Roeck's and Jean Delware's comments I changed list to an array. Initial array size is 4 and it is extended when core id exeeds size of the array, which in practice can mean every time a new core is initialized. I am not sure whether i