From: Jean Delvare <khali@linux-fr.org>
To: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Len Brown <len.brown@intel.com>,
LM Sensors <lm-sensors@lm-sensors.org>,
LKML <linux-kernel@vger.kernel.org>,
Rene Herman <rene.herman@gmail.com>
Subject: Re: [lm-sensors] [PATCH] thermal: Drop CONFIG_THERMAL_HWMON
Date: Sun, 24 Apr 2011 21:40:53 +0200 [thread overview]
Message-ID: <20110424214053.15aa4def@endymion.delvare> (raw)
In-Reply-To: <20110424015853.GA8045@ericsson.com>
Hi Guenter,
On Sat, 23 Apr 2011 18:58:53 -0700, Guenter Roeck wrote:
> On Sat, Apr 23, 2011 at 09:07:03AM -0400, Jean Delvare wrote:
> > It's about time to revert 16d752397301b95abaa95cbaf9e785d221872311.
> > Anybody running a kernel >= 2.6.40 would also be running a recent
> > enough version of lm-sensors.
> >
> > Signed-off-by: Jean Delvare <khali@linux-fr.org>
> > Cc: Rene Herman <rene.herman@gmail.com>
> > Cc: Len Brown <len.brown@intel.com>
>
> Two other and less complex options:
>
> - Add
> select THERMAL_HWMON if HWMON=y || HWMON=THERMAL
> to "menuconfig THERMAL", and keep THERMAL_HWMON as non-selectable bool
> [ I don't know what HWMON=THERMAL means, though ]
HWMON=THERMAL means: both HWMON and THERMAL built as modules, or both
built into the kernel, or neither built at all. Given that the "y" case
is already mentioned explicitly, and the whole thing isn't even
evaluated if THERMAL=n, HWMON=THERMAL here is essentially a shortcut
for "THERMAL=m && HWMON=m".
> - Add
> select HWMON
> to "menuconfig THERMAL", and remove THERMAL_HWMON.
Thanks for the suggestions. I admit I blindly reverted the original
commit without putting much thought into possible alternatives.
Your second suggestion is by far the most simple. However it has a
drawback, it makes it impossible to select THERMAL without HWMON. This
is no concern to me, but maybe some embedded systems will be unhappy
about this. HWMON has no interest in the absence of local users.
Your first suggestion makes a lot of sense, as it avoids repeating the
same non-trivial conditional construct in 3 different places. But OTOH
it leaves in Kconfig an option that shouldn't be there, as nobody
should depend on its value. I consider it an abuse of the Kconfig
system.
In fact, my impression is that the repeated tests, and the fact that two
of them are in <linux/thermal.h>, are the consequence of bad code
design. The fact that THERMAL_HWMON affects a public structure when the
implementation is completely internal to the thermal driver makes no
sense. It should be possible to implement things differently.
Len, please hold on until we agree on the best way to address the issue.
--
Jean Delvare
next prev parent reply other threads:[~2011-04-24 19:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-23 13:07 [PATCH] thermal: Drop CONFIG_THERMAL_HWMON Jean Delvare
2011-04-23 21:06 ` Rene Herman
2011-04-24 1:58 ` [lm-sensors] " Guenter Roeck
2011-04-24 19:40 ` Jean Delvare [this message]
2011-04-24 20:56 ` Guenter Roeck
2011-04-25 18:00 ` Jean Delvare
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=20110424214053.15aa4def@endymion.delvare \
--to=khali@linux-fr.org \
--cc=guenter.roeck@ericsson.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=rene.herman@gmail.com \
/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