Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756083Ab2EGK7x (ORCPT ); Mon, 7 May 2012 06:59:53 -0400 Received: from mga03.intel.com ([143.182.124.21]:53610 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752795Ab2EGK7w convert rfc822-to-8bit (ORCPT ); Mon, 7 May 2012 06:59:52 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="139757415" From: "R, Durgadoss" To: "Kirill A. Shutemov" , "Yu, Fenghua" , Guenter Roeck CC: Andi Kleen , Jean Delvare , "lm-sensors@lm-sensors.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH, v3] hwmon: coretemp: use list instead of fixed size array for temp data Thread-Topic: [PATCH, v3] hwmon: coretemp: use list instead of fixed size array for temp data Thread-Index: AQHNLDzUnmQOFAJAQkaoequKj7BmNpa+J5TQ Date: Mon, 7 May 2012 10:59:48 +0000 Message-ID: <4D68720C2E767A4AA6A8796D42C8EB591184C1@BGSMSX102.gar.corp.intel.com> References: <1336386848-31041-1-git-send-email-kirill.shutemov@linux.intel.com> In-Reply-To: <1336386848-31041-1-git-send-email-kirill.shutemov@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1790 Lines: 54 Hi, > -----Original Message----- > From: Kirill A. Shutemov [mailto:kirill.shutemov@linux.intel.com] > Sent: Monday, May 07, 2012 4:04 PM > To: Yu, Fenghua; Guenter Roeck; R, Durgadoss > Cc: Andi Kleen; Jean Delvare; lm-sensors@lm-sensors.org; linux- > kernel@vger.kernel.org; Kirill A. Shutemov > Subject: [PATCH, v3] hwmon: coretemp: use list instead of fixed size array for > temp data > > From: "Kirill A. Shutemov" > > 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 > --- > 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 > #include > #include > +#include > +#include 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 Thanks, Durga -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/