Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4ecd31a0 authored by Stepan Moskovchenko's avatar Stepan Moskovchenko
Browse files

of: Generate warnings for malformed boolean properties



A properly-formed boolean property does not contain any
value-specific device tree cells. The mere presence of the
name of the property (without a corresponding value)
indicates that a boolean property has been set to 'true'.
However, a common mistake may be to assign a numeric value
to a boolean property, meaning that of_property_read_bool()
will always return 'true' when querying such a property,
even if the property's numeric value has been set to 0.
Therefore, we add a warning that is printed whenever any
user calls of_property_read_bool() on any property that
contains value cells.

Change-Id: I2b626f6f0647ff8c8e8ae729ccea9ede5580e604
Signed-off-by: default avatarStepan Moskovchenko <stepanm@codeaurora.org>
parent c57e2816
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment