Rob Herring (Arm) 64ee3cf096 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 <m.szyprowski@samsung.com>
Reported-by: Steven Price <steven.price@arm.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20241108193547.2647986-2-robh@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-11-08 13:41:34 -06:00
..
2024-07-04 14:36:04 +01:00
2024-10-15 08:58:36 -05:00
2024-10-08 09:47:30 -05:00
2024-09-24 13:02:06 -07:00