Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
of/address: Rework bus matching to avoid warnings
With warnings added for deprecated #address-cells/#size-cells handling, the DT address handling code causes warnings when used on nodes with no address. This happens frequently with calls to of_platform_populate() as it is perfectly acceptable to have devices without a 'reg' property. The desired behavior is to just silently return an error when retrieving an address. The warnings can be avoided by checking for "#address-cells" presence first and checking for an address property before fetching "#address-cells" and "#size-cells". Reported-by: Marek Szyprowski <[email protected]> Reported-by: Steven Price <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
- Loading branch information