All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 3/3 RESEND] hwmon (dme1737): add support
Date: Tue, 13 May 2008 13:21:58 +0000	[thread overview]
Message-ID: <20080513152158.734869ff@hyperion.delvare> (raw)
In-Reply-To: <191fb4ca0805122141m5e31adc4w4984b89d5d759e08@mail.gmail.com>

Hi Juerg,

On Mon, 12 May 2008 21:41:05 -0700, Juerg Haefliger wrote:
> Add support for the SCH5027. The differences to the DME1737 are:
> - No support for programmable temp offsets
> - In auto mode, PWM outputs stay on min value if temp goes below low threshold
>   and can't be programmed to fully turn off
> - Different voltage scaling
> - No VID input
> 
> Signed-off-by: Juerg Haefliger <juergh at gmail.com>
> 
> ---
> Incorporated suggestions from Jean Delvare.

Almost OK, I only have 2 remaining comments, the first of which I think
really needs to be addressed:

> -	kind = dme1737;
> -	name = "dme1737";
> +	if (kind = sch5027) {
> +		name = "sch5027";
> +	} else {
> +		name = "dme1737";
> +	}
>  	data->type = kind;

At this point data->type could be 0 (if the user passed a force
parameter). It _happens_ that right now your driver makes no explicit
test on data->type = dme1737 (nor != dme1737) and all the tests happen
to default to the dme1737 case so 0 and dme1737 will be treated the
same (as far as I can see at least), so it works, however this is
pretty fragile I think. A future code change could break this case and
you probably wouldn't notice. I'd rather see you set kind = dme1737 at
the same time you're setting name = "dme1737", to make sure that
data->type always has a correct value and this value in sync with the
device name.

> +	data->in_nominal = IN_NOMINAL(data->type);

This is common to the I2C and ISA cases so it could be moved to
dme1737_init_device() to avoid code redundancy.

Thanks,
-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

      reply	other threads:[~2008-05-13 13:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-13  4:41 [lm-sensors] [PATCH 3/3 RESEND] hwmon (dme1737): add support Juerg Haefliger
2008-05-13 13:21 ` Jean Delvare [this message]

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=20080513152158.734869ff@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=lm-sensors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.