]> git.ipfire.org Git - thirdparty/linux.git/commit
of/address: Fix WARN when attempting translating non-translatable addresses
authorRob Herring (Arm) <robh@kernel.org>
Fri, 10 Jan 2025 21:50:29 +0000 (15:50 -0600)
committerRob Herring (Arm) <robh@kernel.org>
Sun, 12 Jan 2025 21:31:47 +0000 (15:31 -0600)
commit6e5773d52f4a2d9c80692245f295069260cff6fc
tree3898008db5376e66324b89ba70e8bee4b0161e35
parent44748065ed321041db6e18cdcaa8c2a9554768ac
of/address: Fix WARN when attempting translating non-translatable addresses

The recently added WARN() for deprecated #address-cells and #size-cells
triggered a WARN when of_platform_populate() (which calls
of_address_to_resource()) is used on nodes with non-translatable
addresses. This case is expected to return an error.

Rework the bus matching to allow no match and make the default require
an #address-cells property. That should be safe to do as any platform
missing #address-cells would have a warning already.

Fixes: 045b14ca5c36 ("of: WARN on deprecated #address-cells/#size-cells handling")
Tested-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://lore.kernel.org/r/20250110215030.3637845-2-robh@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
drivers/of/address.c