LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Mark M. Hoffman" <mhoffman@lightlink.com>
To: Craig Kelley <namonai@gmail.com>
Cc: lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 1/1] hwmon: add 0x8c id for smsc47b397 driver
Date: Sun, 2 Mar 2008 14:45:17 -0500	[thread overview]
Message-ID: <20080302194517.GA5324@jupiter.solarsys.private> (raw)
In-Reply-To: <847993120802290924m6b12567p964a17e080030889@mail.gmail.com>

Hi Craig:

* Craig Kelley <namonai@gmail.com> [2008-02-29 10:24:44 -0700]:
> From: Craig Kelley <namonai@gmail.com>
> 
> Added a new ID (0x8c) for the smsc47b397 hardware monitor driver.
> This ID is used by HP in, at least, their dc7700 line.
> 
> Signed-off-by: Craig Kelley <namonai@gmail.com>
> ---
> 
> --- drivers/hwmon/smsc47b397.c-orig     2008-02-29 07:54:18.000000000 -0800
> +++ drivers/hwmon/smsc47b397.c  2008-02-29 07:53:00.000000000 -0800
> @@ -331,11 +331,23 @@ exit:
>  static int __init smsc47b397_find(unsigned short *addr)
>  {
>         u8 id, rev;
> +       char *name;
> 
>         superio_enter();
>         id = superio_inb(SUPERIO_REG_DEVID);
> 
> -       if ((id != 0x6f) && (id != 0x81) && (id != 0x85)) {
> +       switch(id) {
> +       case 0x81:
> +               name = "SCH5307-NS";
> +               break;
> +       case 0x6f:
> +               name = "LPC47B397-NC";
> +               break;
> +       case 0x85:
> +       case 0x8c:
> +               name = "SCH5317";
> +               break;
> +       default:
>                 superio_exit();
>                 return -ENODEV;
>         }
> @@ -348,8 +360,7 @@ static int __init smsc47b397_find(unsign
> 
>         printk(KERN_INFO DRVNAME ": found SMSC %s "
>                 "(base address 0x%04x, revision %u)\n",
> -               id == 0x81 ? "SCH5307-NS" : id == 0x85 ? "SCH5317" :
> -              "LPC47B397-NC", *addr, rev);
> +               name, *addr, rev);
> 
>         superio_exit();
>         return 0;

Some problems with this patch...

1) The whitespace is all busted (spaces where tabs should be).
Did you copy-paste this patch into your mailer?

2) This patch requires 'patch -p0' to apply, whereas standard practice
for Linux kernel patches is to use 'patch -p1'.

3) It's not obvious: to which revision does this patch apply?

Despite these problems, I fixed it up and applied it to my testing
branch... so the change will get to Linus after 2.6.25 is final.

You can find the result here:

http://lm-sensors.org/kernel?p=kernel/mhoffman/hwmon-2.6.git;a=shortlog;h=testing

I try to cut some slack for first-time patch submitters (not to mention
former customers, heh).  But next time, please try to check those things
above before you send a patch.  

Thanks & regards,

-- 
Mark M. Hoffman
mhoffman@lightlink.com


      reply	other threads:[~2008-03-02 19:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29 17:24 Craig Kelley
2008-03-02 19:45 ` Mark M. Hoffman [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=20080302194517.GA5324@jupiter.solarsys.private \
    --to=mhoffman@lightlink.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=namonai@gmail.com \
    --subject='Re: [patch 1/1] hwmon: add 0x8c id for smsc47b397 driver' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).