[PATCH] of: Drop of_address_to_resource() and of_iomap() duplicates

From: Geert Uytterhoeven

Date: Tue Aug 11 2026 - 05:27:28 EST


If CONFIG_OF_ADDRESS is enabled (which depends on CONFIG_OF), there are
two forward declarations for of_address_to_resource() and of_iomap():
one protected by "#ifdef CONFIG_OF_ADDRESS" and a second protected by
"#ifdef CONFIG_OF".

Drop the former, as CONFIG_OF_ADDRESS depends on CONFIG_OF.

Fixes: 4acf4b9cd4534aaa ("of: move of_address_to_resource and of_iomap declarations from sparc")
Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
---
include/linux/of_address.h | 3 ---
1 file changed, 3 deletions(-)

diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index 0cff9036539168b0..eeb7dcf2de3e28f5 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -60,9 +60,6 @@ extern const __be32 *of_translate_dma_region(struct device_node *dev, const __be

#ifdef CONFIG_OF_ADDRESS
extern u64 of_translate_address(struct device_node *np, const __be32 *addr);
-extern int of_address_to_resource(struct device_node *dev, int index,
- struct resource *r);
-extern void __iomem *of_iomap(struct device_node *device, int index);
void __iomem *of_io_request_and_map(struct device_node *device,
int index, const char *name);

--
2.43.0