From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Rob Herring (Arm)" <robh@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Daniel Scally <djrscally@gmail.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Danilo Krummrich <dakr@kernel.org>,
Saravana Kannan <saravanak@google.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 0/2] device property: Warn on (of|fwnode|device)_property_read_bool() for non-boolean properties
Date: Mon, 13 Jan 2025 10:58:22 +0200 [thread overview]
Message-ID: <Z4TVrob9K401tCNK@smile.fi.intel.com> (raw)
In-Reply-To: <20250109-dt-type-warnings-v1-0-0150e32e716c@kernel.org>
On Thu, Jan 09, 2025 at 01:42:04PM -0600, Rob Herring (Arm) wrote:
> This series makes using (of|fwnode|device)_property_read_bool() on
> non-boolean properties give a warning when used with DT. This has been
> deprecated behavior for a while now. Soon we will add yet another
> variant of this function with a Rust binding[1].
>
> Why not put the warning in the fwnode code? The fwnode code doesn't know
> the property's type as that depends on the firmware. For DT, a boolean
> is a property with no value.
>
> Perhaps the ACPI backend should have a warning too? I looked briefly at
> it, but I don't have a clue how or if that can be detected. Doesn't look
> like there's a specific type for booleans. In any case, that would be an
> additional change on top of this series.
ACPI doesn't have such a concept, i.e. there is no separate "boolean" type.
All properties must have a value, we just ignore its content in case of
_read_bool() API, so from ACPI perspective this _read_bool() is purely SW
concept.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2025-01-13 8:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 19:42 [PATCH 0/2] device property: Warn on (of|fwnode|device)_property_read_bool() for non-boolean properties Rob Herring (Arm)
2025-01-09 19:42 ` [PATCH 1/2] device property: Split property reading bool and presence test ops Rob Herring (Arm)
2025-01-10 15:05 ` Greg Kroah-Hartman
2025-01-11 10:14 ` Krzysztof Kozlowski
2025-01-13 19:06 ` Rafael J. Wysocki
2025-01-15 7:23 ` Sakari Ailus
2025-01-09 19:42 ` [PATCH 2/2] of: Warn when of_property_read_bool() is used on non-boolean properties Rob Herring (Arm)
2025-01-11 10:12 ` Krzysztof Kozlowski
2025-01-14 18:35 ` Geert Uytterhoeven
2025-01-14 19:10 ` Andy Shevchenko
2025-01-14 19:19 ` Rob Herring
2025-01-15 11:20 ` Geert Uytterhoeven
2025-03-10 13:15 ` Geert Uytterhoeven
2025-01-13 8:58 ` Andy Shevchenko [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=Z4TVrob9K401tCNK@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=dakr@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=djrscally@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=saravanak@google.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