From: Len Brown <lenb@kernel.org>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Zhang Rui <rui.zhang@intel.com>, Len Brown <len.brown@intel.com>,
linux-kernel@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH] thermal: fix Kconfig dependencies
Date: Mon, 17 Mar 2008 14:59:10 -0400 [thread overview]
Message-ID: <200803171459.10656.lenb@kernel.org> (raw)
In-Reply-To: <20080317184339.GA3754@osiris.boeblingen.de.ibm.com>
On Monday 17 March 2008, Heiko Carstens wrote:
> On Mon, Mar 17, 2008 at 09:55:13AM -0700, Linus Torvalds wrote:
> > On Mon, 17 Mar 2008, Heiko Carstens wrote:
> > >
> > > Change the select to a depends on to fix this. Should work as well.
> >
> > Nope, that doesn't work. ACPI_THERMAL will select THERMAL, so now you have
> > THERMAL selected without HWMON.
>
> Oh, missed that. Sorry.
>
> > As a minimal fix, you'd at least need to make ACPI_THERMAL depend on
> > THERMAL too.
Although the "select" that started this thread was certainly erroneous,
this doesn't look right either.
THERMAL should not depend on or select HWMON.
Instead, part of its code that is there for
the benefit of HWMON should depend on HWMON.
Based on Jean's last message, that code should
probably get its own sub-config option, CONFIG_THERMAL_HWMON
that is default N for the benefit of old libraries.
Similarly, ACPI_THERMAL should not depend on THERMAL,
instead the code that registers with THERMAL should
simply depend on if THERMAL is selected or not.
Also, the "default y" should go.
I'll tinker with this a bit after lunch.
thanks,
-Len
> Updated patch:
>
> Subject: [PATCH] thermal: fix Kconfig dependencies
>
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
>
> git commit 3152fb9f11cdd2fd8688c2c5cb805e5c09b53dd9
> "thermal: fix generic thermal I/F for hwmon" adds a select HWMON
> to THERMAL. This causes HWMON to be selected regardless of its
> other dependencies. In this case depends on HAS_IOMEM gets ignored
> which causes this build error on s390:
>
> drivers/hwmon/w83627hf.c: In function 'superio_outb':
> drivers/hwmon/w83627hf.c:117: error: implicit declaration of function 'outb'
>
> Change the select to a depends on. In addition change the select THERMAL
> from ACPI_THERMAL to a depends on THERMAL. Otherwise THERMAL
> could be selected by ACPI_THERMAL without HWMON being selected.
>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Len Brown <len.brown@intel.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
>
> drivers/acpi/Kconfig | 3 +--
> drivers/thermal/Kconfig | 2 +-
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> Index: linux-2.6/drivers/thermal/Kconfig
> ===================================================================
> --- linux-2.6.orig/drivers/thermal/Kconfig
> +++ linux-2.6/drivers/thermal/Kconfig
> @@ -4,7 +4,7 @@
>
> menuconfig THERMAL
> bool "Generic Thermal sysfs driver"
> - select HWMON
> + depends on HWMON
> default y
> help
> Generic Thermal Sysfs driver offers a generic mechanism for
> Index: linux-2.6/drivers/acpi/Kconfig
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/Kconfig
> +++ linux-2.6/drivers/acpi/Kconfig
> @@ -187,8 +187,7 @@ config ACPI_HOTPLUG_CPU
>
> config ACPI_THERMAL
> tristate "Thermal Zone"
> - depends on ACPI_PROCESSOR
> - select THERMAL
> + depends on ACPI_PROCESSOR && THERMAL
> default y
> help
> This driver adds support for ACPI thermal zones. Most mobile and
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
next prev parent reply other threads:[~2008-03-17 19:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-17 9:58 [PATCH] thermal: fix Kconfig dependencies Heiko Carstens
2008-03-17 16:55 ` Linus Torvalds
2008-03-17 18:43 ` Heiko Carstens
2008-03-17 18:59 ` Len Brown [this message]
2008-03-18 2:25 ` Linus Torvalds
2008-03-18 2:40 ` Zhang, Rui
2008-03-18 5:27 ` Len Brown
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=200803171459.10656.lenb@kernel.org \
--to=lenb@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=heiko.carstens@de.ibm.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=sam@ravnborg.org \
--cc=schwidefsky@de.ibm.com \
--cc=torvalds@linux-foundation.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