From: Catalin Marinas Date: Tue, 1 Dec 2020 12:47:25 +0000 (+0000) Subject: of: unittest: Fix build on architectures without CONFIG_OF_ADDRESS X-Git-Tag: accepted/tizen/unified/20230118.172025~8220^2~9^7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aed5041ef9a3f594ed9dc0bb5ee7e1bbccfd3366;p=platform%2Fkernel%2Flinux-rpi.git 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: 07d13a1d6120 ("of: unittest: Add test for of_dma_get_max_cpu_address()") Reported-by: kernel test robot Signed-off-by: Catalin Marinas --- diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 98cc016..eb51bc1 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");