mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: "R, Durgadoss" <durgadoss.r@intel.com>
Cc: "Yu, Fenghua" <fenghua.yu@intel.com>,
	Guenter Roeck <guenter.roeck@ericsson.com>,
	Andi Kleen <ak@linux.intel.com>,
	Jean Delvare <khali@linux-fr.org>,
	"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH, v3] hwmon: coretemp: use list instead of fixed size array for temp data
Date: Mon, 7 May 2012 14:10:00 +0300	[thread overview]
Message-ID: <20120507110959.GA7339@otc-wbsnb-06> (raw)
In-Reply-To: <4D68720C2E767A4AA6A8796D42C8EB591184C1@BGSMSX102.gar.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1961 bytes --]

On Mon, May 07, 2012 at 10:59:48AM +0000, R, Durgadoss wrote:
> 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" <kirill.shutemov@linux.intel.com>
> > 
> > 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@linux.intel.com>
> > ---
> >  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 :-)

Right. :(
Guenter, should I resend the patch or you can fix this on apply?

> 
> 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.

Do you mean sysfs show methods? It should never be NULL there. If it's
NULL, we have bug (race?) somewhere.

> Acked-by: Durgadoss R <durgadoss.r@intel.com>

Thanks.

-- 
 Kirill A. Shutemov

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-05-07 11:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 10:34 Kirill A. Shutemov
2012-05-07 10:59 ` R, Durgadoss
2012-05-07 11:10   ` Kirill A. Shutemov [this message]
2012-05-07 11:17     ` R, Durgadoss
2012-05-07 13:52 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120507110959.GA7339@otc-wbsnb-06 \
    --to=kirill.shutemov@linux.intel.com \
    --cc=ak@linux.intel.com \
    --cc=durgadoss.r@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=guenter.roeck@ericsson.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®