diff options
author | Jon Hunter <jonathanh@nvidia.com> | 2025-07-09 15:24:52 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2025-07-10 19:09:39 +1000 |
commit | 9cabae6b0351dff7eb634ebcdcabf06a276c1222 (patch) | |
tree | e84489359fd6ce3fbc7fde41a04e9356468d945f /tests | |
parent | 605dc044c3fef39fe5404d40f2b5569d77916339 (diff) | |
download | dtc-master.zip dtc-master.tar.gz dtc-master.tar.bz2 |
If an I2C controller has a 'i2c-bus' child node, then the function
check_i2c_bus_bridge() does not detect this as expected and warnings
such as the following are observed:
Warning (i2c_bus_bridge): /example-0/i2c@7000c000: \
incorrect #address-cells for I2C bus
Warning (i2c_bus_bridge): /example-0/i2c@7000c000: \
incorrect #size-cells for I2C bus
These warnings occur because the '#address-cells' and '#size-cells' are
not directly present under the I2C controller node but the 'i2c-bus'
child node. The function check_i2c_bus_bridge() does not detect this
because it is using the parent node's 'basenamelen' and not the child
node's 'basenamelen' when comparing the child node name with 'i2c-bus'.
The parent node's 'basenamelen' is shorter ('i2c') than 'i2c-bus' and so
the strprefixeq() test fails. Fix this by using the child node
'basenamelen' when comparing the child node name.
Fixes: 53a1bd546905 ("checks: add I2C bus checks")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Message-ID: <20250709142452.249492-1-jonathanh@nvidia.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions