of: address: Consolidate bus .map() functions
authorRob Herring <robh@kernel.org>
Thu, 26 Oct 2023 13:53:59 +0000 (08:53 -0500)
committerRob Herring <robh@kernel.org>
Fri, 27 Oct 2023 21:37:42 +0000 (16:37 -0500)
commit73ae308801a89f273cd888b4f5be5726a747c842
tree17dc618e51375b7a82318ac0770ffbf78533dba6
parent88696db08b7efa3b6bb722014ea7429e78f6be32
of: address: Consolidate bus .map() functions

The bus .map() functions vary only by checking the flag cells values
and skipping over any flag cells to read the addresses. Otherwise they
all do the same reading 'ranges' address and size and returning the
address's offset if it is within the 'ranges' entry.

Refactor all the .map() functions to pass in the flag cell size so that
each bus can check the bus specific flags and then call a common
function to do everything else.

Acked-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20231026135358.3564307-3-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/address.c