diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2020-12-01 12:47:25 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-09 11:11:15 +0100 |
commit | 4645271c32b440d1e0031e979a39dad46f396401 (patch) | |
tree | be01184e5d293179f3db13df1cca34d9e3cf048e /drivers/of | |
parent | b70e6aacbe3207abfc32e923036bd2667f96aee4 (diff) | |
download | kernel_replicant_linux-4645271c32b440d1e0031e979a39dad46f396401.tar.gz kernel_replicant_linux-4645271c32b440d1e0031e979a39dad46f396401.tar.bz2 kernel_replicant_linux-4645271c32b440d1e0031e979a39dad46f396401.zip |
of: unittest: Fix build on architectures without CONFIG_OF_ADDRESS
commit aed5041ef9a3f594ed9dc0bb5ee7e1bbccfd3366 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: 07d13a1d6120 ("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>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/unittest.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 98cc0163301b..eb51bc147440 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -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"); |