Hi, > -----Original Message----- > From: Kirill A. Shutemov [mailto:kirill.shutemov@xxxxxxxxxxxxxxx] > Sent: Monday, May 07, 2012 4:04 PM > To: Yu, Fenghua; Guenter Roeck; R, Durgadoss > Cc: Andi Kleen; Jean Delvare; lm-sensors@xxxxxxxxxxxxxx; linux- > kernel@xxxxxxxxxxxxxxx; Kirill A. Shutemov > Subject: [PATCH, v3] hwmon: coretemp: use list instead of fixed size array for > temp data > > From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> > > Let's rework code to allow arbitrary number of cores on a CPU, not > limited by hardcoded array size. > > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> > --- > v3: > - drop redundant refcounting and checks; > v2: > - fix NULL pointer dereference. Thanks to R, Durgadoss; > - use mutex instead of spinlock for list locking. > --- > drivers/hwmon/coretemp.c | 120 ++++++++++++++++++++++++++++----------- > ------ > 1 files changed, 75 insertions(+), 45 deletions(-) > > diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c > index b9d5123..fa082d5 100644 > --- a/drivers/hwmon/coretemp.c > +++ b/drivers/hwmon/coretemp.c > @@ -36,6 +36,8 @@ > #include <linux/cpu.h> > #include <linux/pci.h> > #include <linux/smp.h> > +#include <linux/list.h> > +#include <linux/kref.h> I think we don't need to include kref.h now :-) BTW, at some places, looks like we are using 'tdata' obtained from get_temp_data, without checking for NULL values. Other than that, looks Ok for me. Acked-by: Durgadoss R <durgadoss.r@xxxxxxxxx> Thanks, Durga _______________________________________________ lm-sensors mailing list lm-sensors@xxxxxxxxxxxxxx http://lists.lm-sensors.org/mailman/listinfo/lm-sensors