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:
Stepan Moskovchenko <stepanm@codeaurora.org>
Loading
Please register or sign in to comment