Commit aed5041e authored by Catalin Marinas's avatar Catalin Marinas

of: unittest: Fix build on architectures without CONFIG_OF_ADDRESS

of_dma_get_max_cpu_address() is not defined if !CONFIG_OF_ADDRESS, so
return early in of_unittest_dma_get_max_cpu_address().

Fixes: 07d13a1d ("of: unittest: Add test for of_dma_get_max_cpu_address()")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 04435217
...@@ -874,6 +874,9 @@ static void __init of_unittest_dma_get_max_cpu_address(void) ...@@ -874,6 +874,9 @@ static void __init of_unittest_dma_get_max_cpu_address(void)
struct device_node *np; struct device_node *np;
phys_addr_t cpu_addr; phys_addr_t cpu_addr;
if (!IS_ENABLED(CONFIG_OF_ADDRESS))
return;
np = of_find_node_by_path("/testcase-data/address-tests"); np = of_find_node_by_path("/testcase-data/address-tests");
if (!np) { if (!np) {
pr_err("missing testcase data\n"); pr_err("missing testcase data\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment