Hi Jindong, FYI, the error/warning still remains. tree: https://github.com/Freescale/linux-fslc pr/616 head: 6c043104035260bc3128a7b8480559bc86f834f0 commit: e1ab8f0dce3e08b5ec37419160bfc04ef4f438e1 [9878/18686] MA-19046 clk: imx8mm: Support building clk-imx8mm driver as module config: powerpc-randconfig-r033-20221207 compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 6e4cea55f0d1104408b26ac574566a0e4de48036) 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 # install powerpc cross compiling tool for clang build # apt-get install binutils-powerpc-linux-gnu # https://github.com/Freescale/linux-fslc/commit/e1ab8f0dce3e08b5ec37419160bfc04ef4f438e1 git remote add freescale-fslc https://github.com/Freescale/linux-fslc git fetch --no-tags freescale-fslc pr/616 git checkout e1ab8f0dce3e08b5ec37419160bfc04ef4f438e1 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/clk/imx/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from drivers/clk/imx/clk-imx8mm.c:11: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:619: arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ :35:1: note: expanded from here __do_insb ^ arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb' #define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/clk/imx/clk-imx8mm.c:11: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:619: arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ :37:1: note: expanded from here __do_insw ^ arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw' #define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/clk/imx/clk-imx8mm.c:11: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:619: arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ :39:1: note: expanded from here __do_insl ^ arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl' #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/clk/imx/clk-imx8mm.c:11: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:619: arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ :41:1: note: expanded from here __do_outsb ^ arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb' #define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/clk/imx/clk-imx8mm.c:11: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:619: arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ :43:1: note: expanded from here __do_outsw ^ arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw' #define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/clk/imx/clk-imx8mm.c:11: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:619: arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ :45:1: note: expanded from here __do_outsl ^ arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl' #define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ >> drivers/clk/imx/clk-imx8mm.c:710:26: warning: unused variable 'delta_k_fops' [-Wunused-const-variable] DEFINE_DEBUGFS_ATTRIBUTE(delta_k_fops, NULL, pll_delta_k_set, "%lld\n"); ^ >> drivers/clk/imx/clk-imx8mm.c:731:1: warning: unused variable 'pll_setting_fops' [-Wunused-const-variable] DEFINE_SHOW_ATTRIBUTE(pll_setting); ^ include/linux/seq_file.h:186:37: note: expanded from macro 'DEFINE_SHOW_ATTRIBUTE' static const struct file_operations __name ## _fops = { \ ^ :416:1: note: expanded from here pll_setting_fops ^ 8 warnings generated. vim +/delta_k_fops +710 drivers/clk/imx/clk-imx8mm.c 85a61310c03536 Jacky Bai 2020-04-07 696 85a61310c03536 Jacky Bai 2020-04-07 697 static int pll_delta_k_set(void *data, u64 val) 85a61310c03536 Jacky Bai 2020-04-07 698 { 85a61310c03536 Jacky Bai 2020-04-07 699 struct clk_hw *hw; 85a61310c03536 Jacky Bai 2020-04-07 700 short int delta_k; 85a61310c03536 Jacky Bai 2020-04-07 701 85a61310c03536 Jacky Bai 2020-04-07 702 hw = data; 85a61310c03536 Jacky Bai 2020-04-07 703 delta_k = (short int) (val & KDIV_MASK); 85a61310c03536 Jacky Bai 2020-04-07 704 85a61310c03536 Jacky Bai 2020-04-07 705 clk_set_delta_k(hw, val); 85a61310c03536 Jacky Bai 2020-04-07 706 85a61310c03536 Jacky Bai 2020-04-07 707 pr_debug("the delta k is %d\n", delta_k); 85a61310c03536 Jacky Bai 2020-04-07 708 return 0; 85a61310c03536 Jacky Bai 2020-04-07 709 } 85a61310c03536 Jacky Bai 2020-04-07 @710 DEFINE_DEBUGFS_ATTRIBUTE(delta_k_fops, NULL, pll_delta_k_set, "%lld\n"); 85a61310c03536 Jacky Bai 2020-04-07 711 85a61310c03536 Jacky Bai 2020-04-07 712 static int pll_setting_show(struct seq_file *s, void *data) 85a61310c03536 Jacky Bai 2020-04-07 713 { 85a61310c03536 Jacky Bai 2020-04-07 714 struct clk_hw *hw; 85a61310c03536 Jacky Bai 2020-04-07 715 u32 pll_div_ctrl0, pll_div_ctrl1; 85a61310c03536 Jacky Bai 2020-04-07 716 u32 mdiv, pdiv, sdiv, kdiv; 85a61310c03536 Jacky Bai 2020-04-07 717 85a61310c03536 Jacky Bai 2020-04-07 718 hw = s->private;; 85a61310c03536 Jacky Bai 2020-04-07 719 85a61310c03536 Jacky Bai 2020-04-07 720 clk_get_pll_setting(hw, &pll_div_ctrl0, &pll_div_ctrl1); 85a61310c03536 Jacky Bai 2020-04-07 721 mdiv = (pll_div_ctrl0 & MDIV_MASK) >> MDIV_SHIFT; 85a61310c03536 Jacky Bai 2020-04-07 722 pdiv = (pll_div_ctrl0 & PDIV_MASK) >> PDIV_SHIFT; 85a61310c03536 Jacky Bai 2020-04-07 723 sdiv = (pll_div_ctrl0 & SDIV_MASK) >> SDIV_SHIFT; 85a61310c03536 Jacky Bai 2020-04-07 724 kdiv = (pll_div_ctrl1 & KDIV_MASK); 85a61310c03536 Jacky Bai 2020-04-07 725 85a61310c03536 Jacky Bai 2020-04-07 726 seq_printf(s, "Mdiv: 0x%x; Pdiv: 0x%x; Sdiv: 0x%x; Kdiv: 0x%x\n", 85a61310c03536 Jacky Bai 2020-04-07 727 mdiv, pdiv, sdiv, kdiv); 85a61310c03536 Jacky Bai 2020-04-07 728 85a61310c03536 Jacky Bai 2020-04-07 729 return 0; 85a61310c03536 Jacky Bai 2020-04-07 730 } 85a61310c03536 Jacky Bai 2020-04-07 @731 DEFINE_SHOW_ATTRIBUTE(pll_setting); 85a61310c03536 Jacky Bai 2020-04-07 732 :::::: The code at line 710 was first introduced by commit :::::: 85a61310c03536f1da881cc423ae83dce540ddad MLK-23751 clk: imx: Add audio PLL debug fs for K-divider monitor control :::::: TO: Jacky Bai :::::: CC: Dong Aisheng -- 0-DAY CI Kernel Test Service https://01.org/lkp