[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z4TVrob9K401tCNK@smile.fi.intel.com>
Date: Mon, 13 Jan 2025 10:58:22 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: "Rob Herring (Arm)" <robh@...nel.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Danilo Krummrich <dakr@...nel.org>,
Saravana Kannan <saravanak@...gle.com>, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 0/2] device property: Warn on
(of|fwnode|device)_property_read_bool() for non-boolean properties
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
Powered by blists - more mailing lists