All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Laszlo Ersek <laszlo.ersek@arm.com>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Heiko Stuebner <heiko@sntech.de>, Joel Stanley <joel@jms.id.au>,
	Sudeep Holla <sudeep.holla@kernel.org>,
	arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-aspeed@lists.ozlabs.org, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] hwmon: remove tautological dependency expressions from Kconfig
Date: Wed, 29 Jul 2026 19:54:02 -0700	[thread overview]
Message-ID: <c175bc7b-aa9a-409e-ba89-b04ecc38dfb7@roeck-us.net> (raw)
In-Reply-To: <20260729215436.2103380-1-laszlo.ersek@arm.com>

On 7/29/26 14:54, Laszlo Ersek wrote:
> Commit 554b3529fe01 ("thermal/drivers/core: Remove the module Kconfig's
> option") [1] obviated some of the "Optional dependencies" (as described in
> "Documentation/kbuild/kconfig-language.rst") in "drivers/hwmon/Kconfig".
> 
> Namely, said commit restricted the valid/possible subset of the full
> Cartesian product "CONFIG_THERMAL x CONFIG_THERMAL_OF" to
> 
>    { (n, n), (y, n), (y, y) }
> 
> through "drivers/thermal/Kconfig". Numerically (using tristate values),
> this set can be expressed as:
> 
>    { (0, 0), (2, 0), (2, 2) }
> 
> Over this set, the "drivers/hwmon/Kconfig" tristate expression
> 
>    THERMAL || !THERMAL_OF
> 
> or equivalently,
> 
>    max(THERMAL, 2-THERMAL_OF)
> 
> invariably evaluates to "y" (2).
> 
> Similarly, with THERMAL having been restricted to
> 
>    { n, y }
> 
> or numerically,
> 
>    { 0, 2 }
> 
> the "drivers/hwmon/Kconfig" tristate expression
> 
>    THERMAL || THERMAL=n
> 
> or equivalently,
> 
>    max(THERMAL, THERMAL=0)
> 
> invariably evaluates to "y" (2). (Note that "THERMAL=0" returns either "y"
> (2) or "n" (0).)
> 
> Commit f37353320ee9 ("hwmon/drivers/core: Simplify complex dependency")
> [2], which is the final commit of the series that [1] is the beginning of,
> cleaned up the hwmon C source code in fact; however, it missed the
> now-collapsed dependencies in Kconfig. At the time of [2], six of today's
> such dependencies were present in Kconfig. Since then, two more have been
> added (such that they persist, anyway): one by commit 4f8d374b770a
> ("hwmon: (max6650) add thermal cooling device capability"), which was
> independent of the above-noted series, and another by commit 9855caf5d4eb
> ("hwmon: add driver for the hwmon parts of qnap-mcu devices"), which was a
> descendant of the series.
> 
> Remove these always-"y" dependencies.
> 

Dependencies such as "THERMAL || THERMAL=n" were supposed to enable the
driver to be built as module or into the kernel if THERMAL=n, and to
force it to be built as module if THERMAL=m. However, both THERMAL
and THERMAL_OF are boolean, so this really does not make sense.

Applied.

Thanks,
Guenter


      parent reply	other threads:[~2026-07-30  2:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 21:54 [RFC PATCH] hwmon: remove tautological dependency expressions from Kconfig Laszlo Ersek
2026-07-29 21:59 ` sashiko-bot
2026-07-30  2:54 ` Guenter Roeck [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=c175bc7b-aa9a-409e-ba89-b04ecc38dfb7@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=andrew@codeconstruct.com.au \
    --cc=arm-scmi@vger.kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=heiko@sntech.de \
    --cc=joel@jms.id.au \
    --cc=laszlo.ersek@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudeep.holla@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.