From: Jean Delvare <jdelvare@suse.de>
To: Laszlo Papp <lpapp@kde.org>
Cc: Jean Delvare <jdelvare@suse.de>, Lee Jones <lee.jones@linaro.org>,
LKML <linux-kernel@vger.kernel.org>,
lm-sensors@lm-sensors.org
Subject: Re: [lm-sensors] [PATCH] hwmon: (max6650) Rename the device ids to contain the hwmon suffix
Date: Mon, 10 Feb 2014 19:55:16 +0100 [thread overview]
Message-ID: <20140210195516.07405462@endymion.delvare> (raw)
In-Reply-To: <CAOMwXhPdu=uNEcffKdmjKsD0q5SKiwDx_Hnv8BTbSsGzqa4SGQ@mail.gmail.com>
On Mon, 10 Feb 2014 18:27:07 +0000, Laszlo Papp wrote:
> On Mon, Feb 10, 2014 at 5:43 PM, Jean Delvare <jdelvare@suse.de> wrote:
> > On Mon, 10 Feb 2014 16:58:53 +0000, Lee Jones wrote:
> >> > > Might be worth taking the opportunity to swap out these magic numbers
> >> > > now.
> >> >
> >> > There's nothing magic about them, they tell the driver how many fans
> >> > each device supports. If you don't pass them as driver_data you'll have
> >> > to derive them from the device name in the probe function.
> >>
> >> They're magic in that they're not easily identifiable. In the few
> >> moments that I looked at the patch I assumed they were device
> >> IDs. They should be clearly defined.
> >
> > They could have been device IDs, some drivers do that, and that would
> > have been equally fine. driver_data can be anything. Best thing to do
> > is to document it right above the device id array if you really find it
> > confusing (I don't.) I don't know what else exactly you had in mind,
> > but #defining FOUR_FANS as 4 and ONE_FAN as 1 and using that doesn't
> > strike me as the best coding practice.
>
> Err... no. 1/4 fan is not the only difference between max6650 and
> max6651 ... (might be worth looking up the datasheet).
This is the only difference the driver cared about so far, so the code
made sense. If the driver is extended to support features which differ
between the MAX6650 and MAX6651 then it will make sense to revisit, of
course.
--
Jean Delvare
Suse L3 Support
next prev parent reply other threads:[~2014-02-10 18:55 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-10 15:25 Laszlo Papp
2014-02-10 16:08 ` Lee Jones
2014-02-10 16:38 ` [lm-sensors] " Jean Delvare
2014-02-10 16:53 ` linux
2014-02-10 18:59 ` Laszlo Papp
2014-02-10 23:10 ` Guenter Roeck
2014-02-11 3:23 ` Laszlo Papp
2014-02-11 3:35 ` Laszlo Papp
2014-02-10 16:58 ` Lee Jones
2014-02-10 17:43 ` Jean Delvare
2014-02-10 18:01 ` Lee Jones
2014-02-10 18:15 ` [lm-sensors] " Jean Delvare
2014-02-10 18:24 ` Lee Jones
2014-02-10 18:27 ` Laszlo Papp
2014-02-10 18:55 ` Jean Delvare [this message]
2014-02-10 17:06 ` [lm-sensors] " Laszlo Papp
2014-02-10 17:09 ` Laszlo Papp
2014-02-11 3:13 ` Laszlo Papp
2014-02-11 7:50 ` Jean Delvare
2014-02-11 8:19 ` Laszlo Papp
2014-02-11 8:28 ` Laszlo Papp
2014-02-11 8:49 ` Jean Delvare
2014-02-11 9:08 ` Laszlo Papp
2014-02-11 9:57 ` Lee Jones
2014-02-11 15:15 ` Laszlo Papp
2014-02-11 8:50 ` Lee Jones
2014-02-11 8:58 ` Laszlo Papp
2014-02-11 9:14 ` Laszlo Papp
2014-02-11 9:47 ` Lee Jones
2014-02-11 9:50 ` Laszlo Papp
2014-02-11 10:22 ` Laszlo Papp
2014-02-11 11:09 ` Laszlo Papp
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=20140210195516.07405462@endymion.delvare \
--to=jdelvare@suse.de \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=lpapp@kde.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®