1
0
Fork 0

of: unittest: Fix build on architectures without CONFIG_OF_ADDRESS

commit aed5041ef9 upstream.

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: 07d13a1d61 ("of: unittest: Add test for of_dma_get_max_cpu_address()")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pull/281/head^2
Catalin Marinas 2020-12-01 12:47:25 +00:00 committed by Greg Kroah-Hartman
parent b70e6aacbe
commit 4645271c32
1 changed files with 3 additions and 0 deletions

View File

@ -874,6 +874,9 @@ static void __init of_unittest_dma_get_max_cpu_address(void)
struct device_node *np;
phys_addr_t cpu_addr;
if (!IS_ENABLED(CONFIG_OF_ADDRESS))
return;
np = of_find_node_by_path("/testcase-data/address-tests");
if (!np) {
pr_err("missing testcase data\n");