Re: [PATCH v4 2/2] clk: Allow COMPILE_TEST for subdir hisilicon in Makefile
On 06/01/2020 05:05 AM, kbuild test robot wrote: Hi Tiezhu, Thank you for the patch! Yet something to improve: [auto build test ERROR on clk/clk-next] [also build test ERROR on v5.7-rc7 next-20200529] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Tiezhu-Yang/clk-hisilicon-Use-correct-return-value-about-hisi_reset_init/20200527-233606 base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next config: openrisc-randconfig-r021-20200531 (attached as .config) compiler: or1k-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot Hi, Thanks for your report, please ignore this patch. All errors (new ones prefixed by >>, old ones prefixed by <<): or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_fixed_rate': clk.c:(.text+0x158): undefined reference to `clk_register_fixed_rate' clk.c:(.text+0x158): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_register_fixed_rate' or1k-linux-ld: clk.c:(.text+0x220): undefined reference to `clk_unregister_fixed_rate' clk.c:(.text+0x220): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_unregister_fixed_rate' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_fixed_factor': clk.c:(.text+0x2a0): undefined reference to `clk_register_fixed_factor' clk.c:(.text+0x2a0): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_register_fixed_factor' or1k-linux-ld: clk.c:(.text+0x370): undefined reference to `clk_unregister_fixed_factor' clk.c:(.text+0x370): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_unregister_fixed_factor' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_mux': clk.c:(.text+0x434): undefined reference to `clk_register_mux_table' clk.c:(.text+0x434): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_register_mux_table' or1k-linux-ld: clk.c:(.text+0x464): undefined reference to `clk_register_clkdev' clk.c:(.text+0x464): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_register_clkdev' or1k-linux-ld: clk.c:(.text+0x528): undefined reference to `clk_unregister_mux' clk.c:(.text+0x528): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_unregister_mux' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_divider': clk.c:(.text+0x6e8): undefined reference to `clk_register_divider_table' clk.c:(.text+0x6e8): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_register_divider_table' or1k-linux-ld: clk.c:(.text+0x718): undefined reference to `clk_register_clkdev' clk.c:(.text+0x718): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_register_clkdev' or1k-linux-ld: clk.c:(.text+0x7d0): undefined reference to `clk_unregister_divider' clk.c:(.text+0x7d0): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_unregister_divider' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_gate': clk.c:(.text+0x870): undefined reference to `clk_register_gate' clk.c:(.text+0x870): additional relocation overflows omitted from the output or1k-linux-ld: clk.c:(.text+0x8a0): undefined reference to `clk_register_clkdev' or1k-linux-ld: clk.c:(.text+0x960): undefined reference to `clk_unregister_gate' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_gate_sep': clk.c:(.text+0xa4c): undefined reference to `clk_register_clkdev' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_init': clk.c:(.text+0xb5c): undefined reference to `of_clk_src_onecell_get' or1k-linux-ld: clk.c:(.text+0xb6c): undefined reference to `of_clk_src_onecell_get' or1k-linux-ld: clk.c:(.text+0xb70): undefined reference to `of_clk_add_provider' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hi6220_clk_register_divider': clk.c:(.init.text+0xe0): undefined reference to `clk_register_clkdev' or1k-linux-ld: drivers/clk/hisilicon/clkgate-separated.o: in function `hisi_register_clkgate_sep': clkgate-separated.c:(.text+0x2b4): undefined reference to `clk_register' or1k-linux-ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_clkdiv_set_rate': clkdivider-hi6220.c:(.text+0x30): undefined reference to
Re: [PATCH v4 2/2] clk: Allow COMPILE_TEST for subdir hisilicon in Makefile
Hi Tiezhu, Thank you for the patch! Yet something to improve: [auto build test ERROR on clk/clk-next] [also build test ERROR on v5.7-rc7 next-20200529] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Tiezhu-Yang/clk-hisilicon-Use-correct-return-value-about-hisi_reset_init/20200527-233606 base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next config: openrisc-randconfig-r021-20200531 (attached as .config) compiler: or1k-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot All errors (new ones prefixed by >>, old ones prefixed by <<): or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_fixed_rate': >> clk.c:(.text+0x158): undefined reference to `clk_register_fixed_rate' clk.c:(.text+0x158): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_register_fixed_rate' or1k-linux-ld: clk.c:(.text+0x220): undefined reference to `clk_unregister_fixed_rate' clk.c:(.text+0x220): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_unregister_fixed_rate' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_fixed_factor': >> clk.c:(.text+0x2a0): undefined reference to `clk_register_fixed_factor' clk.c:(.text+0x2a0): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_register_fixed_factor' or1k-linux-ld: clk.c:(.text+0x370): undefined reference to `clk_unregister_fixed_factor' clk.c:(.text+0x370): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_unregister_fixed_factor' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_mux': >> clk.c:(.text+0x434): undefined reference to `clk_register_mux_table' clk.c:(.text+0x434): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_register_mux_table' or1k-linux-ld: clk.c:(.text+0x464): undefined reference to `clk_register_clkdev' clk.c:(.text+0x464): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_register_clkdev' or1k-linux-ld: clk.c:(.text+0x528): undefined reference to `clk_unregister_mux' clk.c:(.text+0x528): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_unregister_mux' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_divider': >> clk.c:(.text+0x6e8): undefined reference to `clk_register_divider_table' clk.c:(.text+0x6e8): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_register_divider_table' or1k-linux-ld: clk.c:(.text+0x718): undefined reference to `clk_register_clkdev' clk.c:(.text+0x718): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_register_clkdev' or1k-linux-ld: clk.c:(.text+0x7d0): undefined reference to `clk_unregister_divider' clk.c:(.text+0x7d0): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `clk_unregister_divider' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_gate': >> clk.c:(.text+0x870): undefined reference to `clk_register_gate' clk.c:(.text+0x870): additional relocation overflows omitted from the output or1k-linux-ld: clk.c:(.text+0x8a0): undefined reference to `clk_register_clkdev' or1k-linux-ld: clk.c:(.text+0x960): undefined reference to `clk_unregister_gate' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_gate_sep': >> clk.c:(.text+0xa4c): undefined reference to `clk_register_clkdev' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_init': clk.c:(.text+0xb5c): undefined reference to `of_clk_src_onecell_get' or1k-linux-ld: clk.c:(.text+0xb6c): undefined reference to `of_clk_src_onecell_get' or1k-linux-ld: clk.c:(.text+0xb70): undefined reference to `of_clk_add_provider' or1k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hi6220_clk_register_divider': >> clk.c:(.init.text+0xe0): undefined reference to `clk_register_clkdev' or1k-linux-ld: drivers/clk/hisilicon/clkgate-separated.o: in function `hisi_register_clkgate_sep': >> clkgate-separated.c:(.text+0x2b4): undefined reference to `clk_register' or1k-linux-ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_clkdiv_set_rate': >> clkdivider-hi6220.c:(.text+0x30): undefined reference to `divider_get_val' or1k-linux-ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function
[PATCH v4 2/2] clk: Allow COMPILE_TEST for subdir hisilicon in Makefile
If CONFIG_ARCH_HISI is not set but COMPILE_TEST is set, some files in the subdir hisilicon can not be built due to CONFIG_ARCH_HISI check in drivers/clk/Makefile. Since the related configs in drivers/clk/hisilicon/Kconfig depend on ARCH_HISI, so remove CONFIG_ARCH_HISI check for subdir hisilicon in drivers/clk/Makefile. At the same time, we should add CONFIG_ARCH_HISI and COMPILE_TEST (for better compile testing coverage) check for the common files in drivers/clk/hisilicon/Makefile, otherwise there exists build failure about undefined reference. Reported-by: kbuild test robot Signed-off-by: Tiezhu Yang --- v2: - Add CONFIG_ARCH_HISI check for the common files to fix the build failure v3: - Add CONFIG_COMPILE_TEST check for the common files for better compile testing coverage v4: - Modify the patch subject to reflect the reality drivers/clk/Makefile | 2 +- drivers/clk/hisilicon/Makefile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index f4169cc..81045ec 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -79,7 +79,7 @@ obj-y += bcm/ obj-$(CONFIG_ARCH_BERLIN) += berlin/ obj-$(CONFIG_ARCH_DAVINCI) += davinci/ obj-$(CONFIG_H8300)+= h8300/ -obj-$(CONFIG_ARCH_HISI)+= hisilicon/ +obj-y += hisilicon/ obj-y += imgtec/ obj-y += imx/ obj-y += ingenic/ diff --git a/drivers/clk/hisilicon/Makefile b/drivers/clk/hisilicon/Makefile index b2441b9..e58104d 100644 --- a/drivers/clk/hisilicon/Makefile +++ b/drivers/clk/hisilicon/Makefile @@ -3,7 +3,8 @@ # Hisilicon Clock specific Makefile # -obj-y += clk.o clkgate-separated.o clkdivider-hi6220.o clk-hisi-phase.o +obj-$(CONFIG_ARCH_HISI)+= clk.o clkgate-separated.o clkdivider-hi6220.o clk-hisi-phase.o +obj-$(CONFIG_COMPILE_TEST) += clk.o clkgate-separated.o clkdivider-hi6220.o clk-hisi-phase.o obj-$(CONFIG_ARCH_HI3xxx) += clk-hi3620.o obj-$(CONFIG_ARCH_HIP04) += clk-hip04.o -- 2.1.0