* [akpm-mm:mm-unstable 93/173] drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations
@ 2023-07-13 2:57 kernel test robot
2023-07-13 16:26 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: kernel test robot @ 2023-07-13 2:57 UTC (permalink / raw)
To: Baoquan He
Cc: llvm, oe-kbuild-all, Andrew Morton, Linux Memory Management List,
Niklas Schnelle, Christoph Hellwig, Mike Rapoport (IBM)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head: e726c62e70a70ae5536caa0aa131c5dce5c6f764
commit: 827057ff3ce7554741d431145c3b93f1a54125fc [93/173] s390: mm: convert to GENERIC_IOREMAP
config: s390-randconfig-r033-20230713 (https://download.01.org/0day-ci/archive/20230713/202307131033.JgvCSVz4-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230713/202307131033.JgvCSVz4-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307131033.JgvCSVz4-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/clk/clk-fixed-mmio.c:13:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:78:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
| ^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
102 | #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
| ^
In file included from drivers/clk/clk-fixed-mmio.c:13:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:78:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
| ^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
| ^
In file included from drivers/clk/clk-fixed-mmio.c:13:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:78:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
692 | readsb(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
700 | readsw(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
708 | readsl(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
717 | writesb(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
726 | writesw(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
735 | writesl(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
>> drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
33 | iounmap(base);
| ^
arch/s390/include/asm/io.h:29:17: note: expanded from macro 'iounmap'
29 | #define iounmap iounmap
| ^
drivers/clk/clk-fixed-mmio.c:33:2: note: did you mean 'vunmap'?
arch/s390/include/asm/io.h:29:17: note: expanded from macro 'iounmap'
29 | #define iounmap iounmap
| ^
include/linux/vmalloc.h:167:13: note: 'vunmap' declared here
167 | extern void vunmap(const void *addr);
| ^
12 warnings and 1 error generated.
vim +/iounmap +33 drivers/clk/clk-fixed-mmio.c
50cc4caf531abb2 Jan Kotas 2018-12-13 17
50cc4caf531abb2 Jan Kotas 2018-12-13 18 static struct clk_hw *fixed_mmio_clk_setup(struct device_node *node)
50cc4caf531abb2 Jan Kotas 2018-12-13 19 {
50cc4caf531abb2 Jan Kotas 2018-12-13 20 struct clk_hw *clk;
50cc4caf531abb2 Jan Kotas 2018-12-13 21 const char *clk_name = node->name;
50cc4caf531abb2 Jan Kotas 2018-12-13 22 void __iomem *base;
50cc4caf531abb2 Jan Kotas 2018-12-13 23 u32 freq;
50cc4caf531abb2 Jan Kotas 2018-12-13 24 int ret;
50cc4caf531abb2 Jan Kotas 2018-12-13 25
50cc4caf531abb2 Jan Kotas 2018-12-13 26 base = of_iomap(node, 0);
50cc4caf531abb2 Jan Kotas 2018-12-13 27 if (!base) {
50cc4caf531abb2 Jan Kotas 2018-12-13 28 pr_err("%pOFn: failed to map address\n", node);
50cc4caf531abb2 Jan Kotas 2018-12-13 29 return ERR_PTR(-EIO);
50cc4caf531abb2 Jan Kotas 2018-12-13 30 }
50cc4caf531abb2 Jan Kotas 2018-12-13 31
50cc4caf531abb2 Jan Kotas 2018-12-13 32 freq = readl(base);
50cc4caf531abb2 Jan Kotas 2018-12-13 @33 iounmap(base);
50cc4caf531abb2 Jan Kotas 2018-12-13 34 of_property_read_string(node, "clock-output-names", &clk_name);
50cc4caf531abb2 Jan Kotas 2018-12-13 35
50cc4caf531abb2 Jan Kotas 2018-12-13 36 clk = clk_hw_register_fixed_rate(NULL, clk_name, NULL, 0, freq);
50cc4caf531abb2 Jan Kotas 2018-12-13 37 if (IS_ERR(clk)) {
50cc4caf531abb2 Jan Kotas 2018-12-13 38 pr_err("%pOFn: failed to register fixed rate clock\n", node);
50cc4caf531abb2 Jan Kotas 2018-12-13 39 return clk;
50cc4caf531abb2 Jan Kotas 2018-12-13 40 }
50cc4caf531abb2 Jan Kotas 2018-12-13 41
50cc4caf531abb2 Jan Kotas 2018-12-13 42 ret = of_clk_add_hw_provider(node, of_clk_hw_simple_get, clk);
50cc4caf531abb2 Jan Kotas 2018-12-13 43 if (ret) {
50cc4caf531abb2 Jan Kotas 2018-12-13 44 pr_err("%pOFn: failed to add clock provider\n", node);
50cc4caf531abb2 Jan Kotas 2018-12-13 45 clk_hw_unregister(clk);
50cc4caf531abb2 Jan Kotas 2018-12-13 46 clk = ERR_PTR(ret);
50cc4caf531abb2 Jan Kotas 2018-12-13 47 }
50cc4caf531abb2 Jan Kotas 2018-12-13 48
50cc4caf531abb2 Jan Kotas 2018-12-13 49 return clk;
50cc4caf531abb2 Jan Kotas 2018-12-13 50 }
50cc4caf531abb2 Jan Kotas 2018-12-13 51
:::::: The code at line 33 was first introduced by commit
:::::: 50cc4caf531abb2075c6973451fccdaba9f02715 clk: Add Fixed MMIO clock driver
:::::: TO: Jan Kotas <jank@cadence.com>
:::::: CC: Stephen Boyd <sboyd@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [akpm-mm:mm-unstable 93/173] drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations
2023-07-13 2:57 [akpm-mm:mm-unstable 93/173] drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations kernel test robot
@ 2023-07-13 16:26 ` Andrew Morton
2023-07-13 23:59 ` Baoquan He
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2023-07-13 16:26 UTC (permalink / raw)
To: kernel test robot
Cc: Baoquan He, llvm, oe-kbuild-all, Linux Memory Management List,
Niklas Schnelle, Christoph Hellwig, Mike Rapoport (IBM)
On Thu, 13 Jul 2023 10:57:34 +0800 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head: e726c62e70a70ae5536caa0aa131c5dce5c6f764
> commit: 827057ff3ce7554741d431145c3b93f1a54125fc [93/173] s390: mm: convert to GENERIC_IOREMAP
> config: s390-randconfig-r033-20230713 (https://download.01.org/0day-ci/archive/20230713/202307131033.JgvCSVz4-lkp@intel.com/config)
> compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
> reproduce: (https://download.01.org/0day-ci/archive/20230713/202307131033.JgvCSVz4-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202307131033.JgvCSVz4-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> In file included from drivers/clk/clk-fixed-mmio.c:13:
> In file included from include/linux/io.h:13:
> In file included from arch/s390/include/asm/io.h:78:
> include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
> 547 | val = __raw_readb(PCI_IOBASE + addr);
> | ~~~~~~~~~~ ^
Thanks. When I tried that config I got
In file included from ./include/linux/io.h:13,
from drivers/clk/clk-fixed-mmio.c:13:
drivers/clk/clk-fixed-mmio.c: In function 'fixed_mmio_clk_setup':
./arch/s390/include/asm/io.h:29:17: error: implicit declaration of function 'iounmap'; did you mean 'vunmap'? [-Werror=implicit-function-declaration]
29 | #define iounmap iounmap
| ^~~~~~~
drivers/clk/clk-fixed-mmio.c:33:9: note: in expansion of macro 'iounmap'
33 | iounmap(base);
| ^~~~~~~
I'll drop the series.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [akpm-mm:mm-unstable 93/173] drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations
2023-07-13 16:26 ` Andrew Morton
@ 2023-07-13 23:59 ` Baoquan He
2023-07-14 18:08 ` Andrew Morton
2023-07-17 7:05 ` Liu, Yujie
0 siblings, 2 replies; 8+ messages in thread
From: Baoquan He @ 2023-07-13 23:59 UTC (permalink / raw)
To: Andrew Morton
Cc: kernel test robot, llvm, oe-kbuild-all,
Linux Memory Management List, Niklas Schnelle, Christoph Hellwig,
Mike Rapoport (IBM)
Hi Andrew,
On 07/13/23 at 09:26am, Andrew Morton wrote:
> On Thu, 13 Jul 2023 10:57:34 +0800 kernel test robot <lkp@intel.com> wrote:
>
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> > head: e726c62e70a70ae5536caa0aa131c5dce5c6f764
> > commit: 827057ff3ce7554741d431145c3b93f1a54125fc [93/173] s390: mm: convert to GENERIC_IOREMAP
> > config: s390-randconfig-r033-20230713 (https://download.01.org/0day-ci/archive/20230713/202307131033.JgvCSVz4-lkp@intel.com/config)
> > compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
> > reproduce: (https://download.01.org/0day-ci/archive/20230713/202307131033.JgvCSVz4-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202307131033.JgvCSVz4-lkp@intel.com/
> >
> > All errors (new ones prefixed by >>):
> >
> > In file included from drivers/clk/clk-fixed-mmio.c:13:
> > In file included from include/linux/io.h:13:
> > In file included from arch/s390/include/asm/io.h:78:
> > include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
> > 547 | val = __raw_readb(PCI_IOBASE + addr);
> > | ~~~~~~~~~~ ^
>
> Thanks. When I tried that config I got
These two kinds of errors have been reported many times.
This PCI_IOBASE warning will be fixed by Niklas's patch at below:
https://lore.kernel.org/20230522105049.1467313-1-schnelle@linux.ibm.com/
Nathan told this when he reviewed by patch at this sub-thread:
https://lore.kernel.org/all/20230612160237.GA199007@dev-arch.thelio-3990X/T/#u
Quote his words here:
===
I believe that this series [1] by Niklas Schnelle should take care of
the PCI_IOBASE warnings (which are not Hexagon specific), so there is no
need to worry about them when they show up in build reports.
[1]: https://lore.kernel.org/20230522105049.1467313-1-schnelle@linux.ibm.com/
Cheers,
Nathan
===
>
> In file included from ./include/linux/io.h:13,
> from drivers/clk/clk-fixed-mmio.c:13:
> drivers/clk/clk-fixed-mmio.c: In function 'fixed_mmio_clk_setup':
> ./arch/s390/include/asm/io.h:29:17: error: implicit declaration of function 'iounmap'; did you mean 'vunmap'? [-Werror=implicit-function-declaration]
> 29 | #define iounmap iounmap
> | ^~~~~~~
> drivers/clk/clk-fixed-mmio.c:33:9: note: in expansion of macro 'iounmap'
> 33 | iounmap(base);
> | ^~~~~~~
These iorempa/iounmap not defined or declared are not related to my
patches. S390 could set CONFIG_PCI=n, however its ioremap/iounmap code
are all defined in arch/s390/pci/pci.c. Means its ioremap/iounmap code
depends on CONFIG_PCI enabling. So those drivers invoking iomem
functions, (e.g ioremap(), devm_ioremap(), etc) all will be failed to
build if CONFIG_PCI=n on s390.
All these errors have been fixed in my another patchset.
https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com/T/#u
>
> I'll drop the series.
I didn't reply this time because these have been reported repeatedly
recently, I have replied to explain many times in different lkp test
robot. They are all the same two things.
Conclusion:
===========
PCI_IOBASE warning
- taken care by Niklas's patchset
- https://lore.kernel.org/20230522105049.1467313-1-schnelle@linux.ibm.com/
ioremap/iounmap/devm_ioremap_xxx not declared
- existed for very long time, but not caused by my patches, and fixed in my another patchset
- https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com/T/#u
Thanks
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [akpm-mm:mm-unstable 93/173] drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations
2023-07-13 23:59 ` Baoquan He
@ 2023-07-14 18:08 ` Andrew Morton
2023-07-17 7:05 ` Liu, Yujie
1 sibling, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2023-07-14 18:08 UTC (permalink / raw)
To: Baoquan He
Cc: kernel test robot, llvm, oe-kbuild-all,
Linux Memory Management List, Niklas Schnelle, Christoph Hellwig,
Mike Rapoport (IBM)
On Fri, 14 Jul 2023 07:59:14 +0800 Baoquan He <bhe@redhat.com> wrote:
> > > All errors (new ones prefixed by >>):
> > >
> > > In file included from drivers/clk/clk-fixed-mmio.c:13:
> > > In file included from include/linux/io.h:13:
> > > In file included from arch/s390/include/asm/io.h:78:
> > > include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
> > > 547 | val = __raw_readb(PCI_IOBASE + addr);
> > > | ~~~~~~~~~~ ^
> >
> > Thanks. When I tried that config I got
>
> These two kinds of errors have been reported many times.
>
> This PCI_IOBASE warning will be fixed by Niklas's patch at below:
>
> https://lore.kernel.org/20230522105049.1467313-1-schnelle@linux.ibm.com/
>
>
> Nathan told this when he reviewed by patch at this sub-thread:
> https://lore.kernel.org/all/20230612160237.GA199007@dev-arch.thelio-3990X/T/#u
>
> Quote his words here:
> ===
> I believe that this series [1] by Niklas Schnelle should take care of
> the PCI_IOBASE warnings (which are not Hexagon specific), so there is no
> need to worry about them when they show up in build reports.
>
> [1]: https://lore.kernel.org/20230522105049.1467313-1-schnelle@linux.ibm.com/
OK, I'll restore the series "mm: ioremap: Convert architectures to take
GENERIC_IOREMAP way", v8.
This kind of already-was-there warning causes quite some trouble.
Attempts to fix such fallout are appreciated.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [akpm-mm:mm-unstable 93/173] drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations
2023-07-13 23:59 ` Baoquan He
2023-07-14 18:08 ` Andrew Morton
@ 2023-07-17 7:05 ` Liu, Yujie
2023-07-18 0:06 ` bhe
1 sibling, 1 reply; 8+ messages in thread
From: Liu, Yujie @ 2023-07-17 7:05 UTC (permalink / raw)
To: bhe@redhat.com
Cc: lkp, oe-kbuild-all@lists.linux.dev, hch@lst.de,
akpm@linux-foundation.org, linux-mm@kvack.org,
llvm@lists.linux.dev, rppt@kernel.org, schnelle@linux.ibm.com
Hi Baoquan,
On Fri, 2023-07-14 at 07:59 +0800, Baoquan He wrote:
> >
> > In file included from ./include/linux/io.h:13,
> > from drivers/clk/clk-fixed-mmio.c:13:
> > drivers/clk/clk-fixed-mmio.c: In function 'fixed_mmio_clk_setup':
> > ./arch/s390/include/asm/io.h:29:17: error: implicit declaration of function 'iounmap'; did you mean 'vunmap'? [-Werror=implicit-function-declaration]
> > 29 | #define iounmap iounmap
> > | ^~~~~~~
> > drivers/clk/clk-fixed-mmio.c:33:9: note: in expansion of macro 'iounmap'
> > 33 | iounmap(base);
> > | ^~~~~~~
>
> These iorempa/iounmap not defined or declared are not related to my
> patches. S390 could set CONFIG_PCI=n, however its ioremap/iounmap code
> are all defined in arch/s390/pci/pci.c. Means its ioremap/iounmap code
> depends on CONFIG_PCI enabling. So those drivers invoking iomem
> functions, (e.g ioremap(), devm_ioremap(), etc) all will be failed to
> build if CONFIG_PCI=n on s390.
>
> All these errors have been fixed in my another patchset.
>
> https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com/T/#u
Sorry for the duplicate reports and late reply.
We searched the log of kernel test robot and got the following clues
for this case:
This is a randconfig build test, so the kconfig happened to set
CONFIG_PCI=n and CONFIG_COMMON_CLK_FIXED_MMIO=y, and it is good to
build the clk-fixed-mmio driver in such case before, but it raises a
build error after applying your patches, so the bot thought that a new
build error was introduced and sent reports to you.
== without the patches (v6.5-rc1 as example) ==
$ git checkout v6.5-rc1
HEAD is now at 06c2afb862f9 Linux 6.5-rc1
$ grep -e CONFIG_PCI -e CONFIG_COMMON_CLK_FIXED_MMIO .config
# CONFIG_PCI is not set
CONFIG_COMMON_CLK_FIXED_MMIO=y
$ COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross LLVM_IAS=1 W=1 ARCH=s390 drivers/clk/clk-fixed-mmio.o
...
$ file drivers/clk/clk-fixed-mmio.o
drivers/clk/clk-fixed-mmio.o: ELF 64-bit MSB relocatable, IBM S/390, version 1 (SYSV), not stripped
== with the patches ==
$ git checkout b0f683e34a5b
HEAD is now at b0f683e34a5b s390: mm: convert to GENERIC_IOREMAP
$ grep -e CONFIG_PCI -e CONFIG_COMMON_CLK_FIXED_MMIO .config
# CONFIG_PCI is not set
CONFIG_COMMON_CLK_FIXED_MMIO=y
$ COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ./make.cross LLVM_IAS=1 W=1 ARCH=s390 drivers/clk/clk-fixed-mmio.o
...
drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
33 | iounmap(base);
| ^
./arch/s390/include/asm/io.h:29:17: note: expanded from macro 'iounmap'
29 | #define iounmap iounmap
| ^
drivers/clk/clk-fixed-mmio.c:33:2: note: did you mean 'vunmap'?
./arch/s390/include/asm/io.h:29:17: note: expanded from macro 'iounmap'
29 | #define iounmap iounmap
| ^
./include/linux/vmalloc.h:167:13: note: 'vunmap' declared here
167 | extern void vunmap(const void *addr);
| ^
12 warnings and 1 error generated.
make[4]: *** [scripts/Makefile.build:243: drivers/clk/clk-fixed-mmio.o] Error 1
make[3]: *** [scripts/Makefile.build:477: drivers/clk] Error 2
make[3]: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
make[2]: *** [scripts/Makefile.build:477: drivers] Error 2
make[2]: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
make[1]: *** [/home/yujie/linux/Makefile:2020: .] Error 2
make[1]: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
make: *** [Makefile:234: __sub-make] Error 2
make: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
After applying the patchset at
https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com,
above situation cannot happen anymore because CONFIG_PCI and
CONFIG_COMMON_CLK_FIXED_MMIO can only be both enabled or both disabled,
so the issue has been resolved.
Best Regards,
Yujie
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [akpm-mm:mm-unstable 93/173] drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations
2023-07-17 7:05 ` Liu, Yujie
@ 2023-07-18 0:06 ` bhe
2023-07-18 6:19 ` Liu, Yujie
0 siblings, 1 reply; 8+ messages in thread
From: bhe @ 2023-07-18 0:06 UTC (permalink / raw)
To: Liu, Yujie
Cc: lkp, oe-kbuild-all@lists.linux.dev, hch@lst.de,
akpm@linux-foundation.org, linux-mm@kvack.org,
llvm@lists.linux.dev, rppt@kernel.org, schnelle@linux.ibm.com
On 07/17/23 at 07:05am, Liu, Yujie wrote:
> Hi Baoquan,
>
> On Fri, 2023-07-14 at 07:59 +0800, Baoquan He wrote:
> > >
> > > In file included from ./include/linux/io.h:13,
> > > from drivers/clk/clk-fixed-mmio.c:13:
> > > drivers/clk/clk-fixed-mmio.c: In function 'fixed_mmio_clk_setup':
> > > ./arch/s390/include/asm/io.h:29:17: error: implicit declaration of function 'iounmap'; did you mean 'vunmap'? [-Werror=implicit-function-declaration]
> > > 29 | #define iounmap iounmap
> > > | ^~~~~~~
> > > drivers/clk/clk-fixed-mmio.c:33:9: note: in expansion of macro 'iounmap'
> > > 33 | iounmap(base);
> > > | ^~~~~~~
> >
> > These iorempa/iounmap not defined or declared are not related to my
> > patches. S390 could set CONFIG_PCI=n, however its ioremap/iounmap code
> > are all defined in arch/s390/pci/pci.c. Means its ioremap/iounmap code
> > depends on CONFIG_PCI enabling. So those drivers invoking iomem
> > functions, (e.g ioremap(), devm_ioremap(), etc) all will be failed to
> > build if CONFIG_PCI=n on s390.
> >
> > All these errors have been fixed in my another patchset.
> >
> > https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com/T/#u
>
> Sorry for the duplicate reports and late reply.
>
> We searched the log of kernel test robot and got the following clues
> for this case:
>
> This is a randconfig build test, so the kconfig happened to set
> CONFIG_PCI=n and CONFIG_COMMON_CLK_FIXED_MMIO=y, and it is good to
> build the clk-fixed-mmio driver in such case before, but it raises a
> build error after applying your patches, so the bot thought that a new
> build error was introduced and sent reports to you.
>
> == without the patches (v6.5-rc1 as example) ==
>
> $ git checkout v6.5-rc1
> HEAD is now at 06c2afb862f9 Linux 6.5-rc1
>
> $ grep -e CONFIG_PCI -e CONFIG_COMMON_CLK_FIXED_MMIO .config
> # CONFIG_PCI is not set
> CONFIG_COMMON_CLK_FIXED_MMIO=y
>
> $ COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross LLVM_IAS=1 W=1 ARCH=s390 drivers/clk/clk-fixed-mmio.o
> ...
>
> $ file drivers/clk/clk-fixed-mmio.o
> drivers/clk/clk-fixed-mmio.o: ELF 64-bit MSB relocatable, IBM S/390, version 1 (SYSV), not stripped
>
> == with the patches ==
>
> $ git checkout b0f683e34a5b
> HEAD is now at b0f683e34a5b s390: mm: convert to GENERIC_IOREMAP
>
> $ grep -e CONFIG_PCI -e CONFIG_COMMON_CLK_FIXED_MMIO .config
> # CONFIG_PCI is not set
> CONFIG_COMMON_CLK_FIXED_MMIO=y
>
> $ COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ./make.cross LLVM_IAS=1 W=1 ARCH=s390 drivers/clk/clk-fixed-mmio.o
> ...
> drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> 33 | iounmap(base);
> | ^
> ./arch/s390/include/asm/io.h:29:17: note: expanded from macro 'iounmap'
> 29 | #define iounmap iounmap
> | ^
> drivers/clk/clk-fixed-mmio.c:33:2: note: did you mean 'vunmap'?
> ./arch/s390/include/asm/io.h:29:17: note: expanded from macro 'iounmap'
> 29 | #define iounmap iounmap
> | ^
> ./include/linux/vmalloc.h:167:13: note: 'vunmap' declared here
> 167 | extern void vunmap(const void *addr);
> | ^
> 12 warnings and 1 error generated.
> make[4]: *** [scripts/Makefile.build:243: drivers/clk/clk-fixed-mmio.o] Error 1
> make[3]: *** [scripts/Makefile.build:477: drivers/clk] Error 2
> make[3]: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
> make[2]: *** [scripts/Makefile.build:477: drivers] Error 2
> make[2]: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
> make[1]: *** [/home/yujie/linux/Makefile:2020: .] Error 2
> make[1]: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
> make: *** [Makefile:234: __sub-make] Error 2
> make: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
>
>
> After applying the patchset at
> https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com,
> above situation cannot happen anymore because CONFIG_PCI and
> CONFIG_COMMON_CLK_FIXED_MMIO can only be both enabled or both disabled,
> so the issue has been resolved.
No, your process may need be improved.
On linus's master branch, you can pass compiling on
drivers/clk/clk-fixed-mmio.o, but you absolutely will fail during linking
stage. As I have explained, ioremap()/iounmap()/ioremap_xx() are all
defined in arch/s390/pci/pci.c. Setting CONFIG_PCI=n will make you not
be able to find the implementation of ioremap()/iounmap(). Don't you
finish the whole building process of kernel image and modules?
Please see below building log, the linking is failed. I got a new s390x
machine, and git clone linus's tree and build with randconfig from this
lkp report.
When I made below patch and tested, I also only git clone linus's latest
kernel tree. I didn't apply any patch. The current lkp report and your
checking could be misleading.
[PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM
https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com,
=====
AR drivers/iio/built-in.a
AR drivers/built-in.a
AR built-in.a
AR vmlinux.a
LD vmlinux.o
OBJCOPY modules.builtin.modinfo
GEN modules.builtin
MODPOST vmlinux.symvers
UPD include/generated/utsversion.h
CC init/version-timestamp.o
LD .tmp_vmlinux.kallsyms1
ld: drivers/clk/clk-fixed-mmio.o: in function `fixed_mmio_clk_setup':
clk-fixed-mmio.c:(.text+0x44): undefined reference to `of_iomap'
ld: clk-fixed-mmio.c:(.text+0x9c): undefined reference to `iounmap'
ld: drivers/pcmcia/cistpl.o: in function `set_cis_map':
cistpl.c:(.text+0x52a): undefined reference to `ioremap'
ld: cistpl.c:(.text+0x602): undefined reference to `iounmap'
ld: cistpl.c:(.text+0x650): undefined reference to `iounmap'
ld: cistpl.c:(.text+0x668): undefined reference to `ioremap'
ld: drivers/pcmcia/cistpl.o: in function `release_cis_mem':
cistpl.c:(.text+0x85c): undefined reference to `iounmap'
make[2]: *** [scripts/Makefile.vmlinux:36: vmlinux] Error 1
make[1]: *** [/root/linux/Makefile:1238: vmlinux] Error 2
make: *** [Makefile:234: __sub-make] Error 2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [akpm-mm:mm-unstable 93/173] drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations
2023-07-18 0:06 ` bhe
@ 2023-07-18 6:19 ` Liu, Yujie
2023-07-18 8:47 ` bhe
0 siblings, 1 reply; 8+ messages in thread
From: Liu, Yujie @ 2023-07-18 6:19 UTC (permalink / raw)
To: bhe@redhat.com
Cc: lkp, hch@lst.de, oe-kbuild-all@lists.linux.dev,
akpm@linux-foundation.org, linux-mm@kvack.org,
llvm@lists.linux.dev, rppt@kernel.org, schnelle@linux.ibm.com
On Tue, 2023-07-18 at 08:06 +0800, bhe@redhat.com wrote:
> On 07/17/23 at 07:05am, Liu, Yujie wrote:
> > Hi Baoquan,
> >
> > On Fri, 2023-07-14 at 07:59 +0800, Baoquan He wrote:
> > > >
> > > > In file included from ./include/linux/io.h:13,
> > > > from drivers/clk/clk-fixed-mmio.c:13:
> > > > drivers/clk/clk-fixed-mmio.c: In function 'fixed_mmio_clk_setup':
> > > > ./arch/s390/include/asm/io.h:29:17: error: implicit declaration of function 'iounmap'; did you mean 'vunmap'? [-Werror=implicit-function-declaration]
> > > > 29 | #define iounmap iounmap
> > > > | ^~~~~~~
> > > > drivers/clk/clk-fixed-mmio.c:33:9: note: in expansion of macro 'iounmap'
> > > > 33 | iounmap(base);
> > > > | ^~~~~~~
> > >
> > > These iorempa/iounmap not defined or declared are not related to my
> > > patches. S390 could set CONFIG_PCI=n, however its ioremap/iounmap code
> > > are all defined in arch/s390/pci/pci.c. Means its ioremap/iounmap code
> > > depends on CONFIG_PCI enabling. So those drivers invoking iomem
> > > functions, (e.g ioremap(), devm_ioremap(), etc) all will be failed to
> > > build if CONFIG_PCI=n on s390.
> > >
> > > All these errors have been fixed in my another patchset.
> > >
> > > https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com/T/#u
> >
> > Sorry for the duplicate reports and late reply.
> >
> > We searched the log of kernel test robot and got the following clues
> > for this case:
> >
> > This is a randconfig build test, so the kconfig happened to set
> > CONFIG_PCI=n and CONFIG_COMMON_CLK_FIXED_MMIO=y, and it is good to
> > build the clk-fixed-mmio driver in such case before, but it raises a
> > build error after applying your patches, so the bot thought that a new
> > build error was introduced and sent reports to you.
> >
> > == without the patches (v6.5-rc1 as example) ==
> >
> > $ git checkout v6.5-rc1
> > HEAD is now at 06c2afb862f9 Linux 6.5-rc1
> >
> > $ grep -e CONFIG_PCI -e CONFIG_COMMON_CLK_FIXED_MMIO .config
> > # CONFIG_PCI is not set
> > CONFIG_COMMON_CLK_FIXED_MMIO=y
> >
> > $ COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross LLVM_IAS=1 W=1 ARCH=s390 drivers/clk/clk-fixed-mmio.o
> > ...
> >
> > $ file drivers/clk/clk-fixed-mmio.o
> > drivers/clk/clk-fixed-mmio.o: ELF 64-bit MSB relocatable, IBM S/390, version 1 (SYSV), not stripped
> >
> > == with the patches ==
> >
> > $ git checkout b0f683e34a5b
> > HEAD is now at b0f683e34a5b s390: mm: convert to GENERIC_IOREMAP
> >
> > $ grep -e CONFIG_PCI -e CONFIG_COMMON_CLK_FIXED_MMIO .config
> > # CONFIG_PCI is not set
> > CONFIG_COMMON_CLK_FIXED_MMIO=y
> >
> > $ COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ./make.cross LLVM_IAS=1 W=1 ARCH=s390 drivers/clk/clk-fixed-mmio.o
> > ...
> > drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> > 33 | iounmap(base);
> > | ^
> > ./arch/s390/include/asm/io.h:29:17: note: expanded from macro 'iounmap'
> > 29 | #define iounmap iounmap
> > | ^
> > drivers/clk/clk-fixed-mmio.c:33:2: note: did you mean 'vunmap'?
> > ./arch/s390/include/asm/io.h:29:17: note: expanded from macro 'iounmap'
> > 29 | #define iounmap iounmap
> > | ^
> > ./include/linux/vmalloc.h:167:13: note: 'vunmap' declared here
> > 167 | extern void vunmap(const void *addr);
> > | ^
> > 12 warnings and 1 error generated.
> > make[4]: *** [scripts/Makefile.build:243: drivers/clk/clk-fixed-mmio.o] Error 1
> > make[3]: *** [scripts/Makefile.build:477: drivers/clk] Error 2
> > make[3]: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
> > make[2]: *** [scripts/Makefile.build:477: drivers] Error 2
> > make[2]: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
> > make[1]: *** [/home/yujie/linux/Makefile:2020: .] Error 2
> > make[1]: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
> > make: *** [Makefile:234: __sub-make] Error 2
> > make: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
> >
> >
> > After applying the patchset at
> > https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com,
> > above situation cannot happen anymore because CONFIG_PCI and
> > CONFIG_COMMON_CLK_FIXED_MMIO can only be both enabled or both disabled,
> > so the issue has been resolved.
>
> No, your process may need be improved.
>
> On linus's master branch, you can pass compiling on
> drivers/clk/clk-fixed-mmio.o, but you absolutely will fail during linking
> stage. As I have explained, ioremap()/iounmap()/ioremap_xx() are all
> defined in arch/s390/pci/pci.c. Setting CONFIG_PCI=n will make you not
> be able to find the implementation of ioremap()/iounmap(). Don't you
> finish the whole building process of kernel image and modules?
Sorry I didn't make it very clear in the last mail. We also got the
failure in link stage when testing on mainline. After applying your
patch, it became an error in compile stage and won't reach link stage
anymore. In other words, your patch helped to expose an existing issue
earlier from linking to compiling. Our bot cannot handle such case very
well for now since the compiling error and linking error are very
different. Of course this should be a false positive report and your
patch should not be blamed for exposing an existing issue. Sorry for
any misleading or disturbing. We will consider some optimizations for
similar cases.
Thanks,
Yujie
> Please see below building log, the linking is failed. I got a new s390x
> machine, and git clone linus's tree and build with randconfig from this
> lkp report.
>
> When I made below patch and tested, I also only git clone linus's latest
> kernel tree. I didn't apply any patch. The current lkp report and your
> checking could be misleading.
>
> [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM
> https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com,
>
> =====
> AR drivers/iio/built-in.a
> AR drivers/built-in.a
> AR built-in.a
> AR vmlinux.a
> LD vmlinux.o
> OBJCOPY modules.builtin.modinfo
> GEN modules.builtin
> MODPOST vmlinux.symvers
> UPD include/generated/utsversion.h
> CC init/version-timestamp.o
> LD .tmp_vmlinux.kallsyms1
> ld: drivers/clk/clk-fixed-mmio.o: in function `fixed_mmio_clk_setup':
> clk-fixed-mmio.c:(.text+0x44): undefined reference to `of_iomap'
> ld: clk-fixed-mmio.c:(.text+0x9c): undefined reference to `iounmap'
> ld: drivers/pcmcia/cistpl.o: in function `set_cis_map':
> cistpl.c:(.text+0x52a): undefined reference to `ioremap'
> ld: cistpl.c:(.text+0x602): undefined reference to `iounmap'
> ld: cistpl.c:(.text+0x650): undefined reference to `iounmap'
> ld: cistpl.c:(.text+0x668): undefined reference to `ioremap'
> ld: drivers/pcmcia/cistpl.o: in function `release_cis_mem':
> cistpl.c:(.text+0x85c): undefined reference to `iounmap'
> make[2]: *** [scripts/Makefile.vmlinux:36: vmlinux] Error 1
> make[1]: *** [/root/linux/Makefile:1238: vmlinux] Error 2
> make: *** [Makefile:234: __sub-make] Error 2
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [akpm-mm:mm-unstable 93/173] drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations
2023-07-18 6:19 ` Liu, Yujie
@ 2023-07-18 8:47 ` bhe
0 siblings, 0 replies; 8+ messages in thread
From: bhe @ 2023-07-18 8:47 UTC (permalink / raw)
To: Liu, Yujie
Cc: lkp, hch@lst.de, oe-kbuild-all@lists.linux.dev,
akpm@linux-foundation.org, linux-mm@kvack.org,
llvm@lists.linux.dev, rppt@kernel.org, schnelle@linux.ibm.com
On 07/18/23 at 06:19am, Liu, Yujie wrote:
> On Tue, 2023-07-18 at 08:06 +0800, bhe@redhat.com wrote:
> > On 07/17/23 at 07:05am, Liu, Yujie wrote:
> > > Hi Baoquan,
> > >
> > > On Fri, 2023-07-14 at 07:59 +0800, Baoquan He wrote:
> > > > >
> > > > > In file included from ./include/linux/io.h:13,
> > > > > from drivers/clk/clk-fixed-mmio.c:13:
> > > > > drivers/clk/clk-fixed-mmio.c: In function 'fixed_mmio_clk_setup':
> > > > > ./arch/s390/include/asm/io.h:29:17: error: implicit declaration of function 'iounmap'; did you mean 'vunmap'? [-Werror=implicit-function-declaration]
> > > > > 29 | #define iounmap iounmap
> > > > > | ^~~~~~~
> > > > > drivers/clk/clk-fixed-mmio.c:33:9: note: in expansion of macro 'iounmap'
> > > > > 33 | iounmap(base);
> > > > > | ^~~~~~~
> > > >
> > > > These iorempa/iounmap not defined or declared are not related to my
> > > > patches. S390 could set CONFIG_PCI=n, however its ioremap/iounmap code
> > > > are all defined in arch/s390/pci/pci.c. Means its ioremap/iounmap code
> > > > depends on CONFIG_PCI enabling. So those drivers invoking iomem
> > > > functions, (e.g ioremap(), devm_ioremap(), etc) all will be failed to
> > > > build if CONFIG_PCI=n on s390.
> > > >
> > > > All these errors have been fixed in my another patchset.
> > > >
> > > > https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com/T/#u
> > >
> > > Sorry for the duplicate reports and late reply.
> > >
> > > We searched the log of kernel test robot and got the following clues
> > > for this case:
> > >
> > > This is a randconfig build test, so the kconfig happened to set
> > > CONFIG_PCI=n and CONFIG_COMMON_CLK_FIXED_MMIO=y, and it is good to
> > > build the clk-fixed-mmio driver in such case before, but it raises a
> > > build error after applying your patches, so the bot thought that a new
> > > build error was introduced and sent reports to you.
> > >
> > > == without the patches (v6.5-rc1 as example) ==
> > >
> > > $ git checkout v6.5-rc1
> > > HEAD is now at 06c2afb862f9 Linux 6.5-rc1
> > >
> > > $ grep -e CONFIG_PCI -e CONFIG_COMMON_CLK_FIXED_MMIO .config
> > > # CONFIG_PCI is not set
> > > CONFIG_COMMON_CLK_FIXED_MMIO=y
> > >
> > > $ COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross LLVM_IAS=1 W=1 ARCH=s390 drivers/clk/clk-fixed-mmio.o
> > > ...
> > >
> > > $ file drivers/clk/clk-fixed-mmio.o
> > > drivers/clk/clk-fixed-mmio.o: ELF 64-bit MSB relocatable, IBM S/390, version 1 (SYSV), not stripped
> > >
> > > == with the patches ==
> > >
> > > $ git checkout b0f683e34a5b
> > > HEAD is now at b0f683e34a5b s390: mm: convert to GENERIC_IOREMAP
> > >
> > > $ grep -e CONFIG_PCI -e CONFIG_COMMON_CLK_FIXED_MMIO .config
> > > # CONFIG_PCI is not set
> > > CONFIG_COMMON_CLK_FIXED_MMIO=y
> > >
> > > $ COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ./make.cross LLVM_IAS=1 W=1 ARCH=s390 drivers/clk/clk-fixed-mmio.o
> > > ...
> > > drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> > > 33 | iounmap(base);
> > > | ^
> > > ./arch/s390/include/asm/io.h:29:17: note: expanded from macro 'iounmap'
> > > 29 | #define iounmap iounmap
> > > | ^
> > > drivers/clk/clk-fixed-mmio.c:33:2: note: did you mean 'vunmap'?
> > > ./arch/s390/include/asm/io.h:29:17: note: expanded from macro 'iounmap'
> > > 29 | #define iounmap iounmap
> > > | ^
> > > ./include/linux/vmalloc.h:167:13: note: 'vunmap' declared here
> > > 167 | extern void vunmap(const void *addr);
> > > | ^
> > > 12 warnings and 1 error generated.
> > > make[4]: *** [scripts/Makefile.build:243: drivers/clk/clk-fixed-mmio.o] Error 1
> > > make[3]: *** [scripts/Makefile.build:477: drivers/clk] Error 2
> > > make[3]: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
> > > make[2]: *** [scripts/Makefile.build:477: drivers] Error 2
> > > make[2]: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
> > > make[1]: *** [/home/yujie/linux/Makefile:2020: .] Error 2
> > > make[1]: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
> > > make: *** [Makefile:234: __sub-make] Error 2
> > > make: Target 'drivers/clk/clk-fixed-mmio.o' not remade because of errors.
> > >
> > >
> > > After applying the patchset at
> > > https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com,
> > > above situation cannot happen anymore because CONFIG_PCI and
> > > CONFIG_COMMON_CLK_FIXED_MMIO can only be both enabled or both disabled,
> > > so the issue has been resolved.
> >
> > No, your process may need be improved.
> >
> > On linus's master branch, you can pass compiling on
> > drivers/clk/clk-fixed-mmio.o, but you absolutely will fail during linking
> > stage. As I have explained, ioremap()/iounmap()/ioremap_xx() are all
> > defined in arch/s390/pci/pci.c. Setting CONFIG_PCI=n will make you not
> > be able to find the implementation of ioremap()/iounmap(). Don't you
> > finish the whole building process of kernel image and modules?
>
> Sorry I didn't make it very clear in the last mail. We also got the
> failure in link stage when testing on mainline. After applying your
> patch, it became an error in compile stage and won't reach link stage
> anymore. In other words, your patch helped to expose an existing issue
> earlier from linking to compiling. Our bot cannot handle such case very
> well for now since the compiling error and linking error are very
> different. Of course this should be a false positive report and your
> patch should not be blamed for exposing an existing issue. Sorry for
> any misleading or disturbing. We will consider some optimizations for
> similar cases.
I see. Seems there's still room for LKP to differentiate the compiling
issue from the linking issue.
Thanks for these details and your great effort.
>
>
> > Please see below building log, the linking is failed. I got a new s390x
> > machine, and git clone linus's tree and build with randconfig from this
> > lkp report.
> >
> > When I made below patch and tested, I also only git clone linus's latest
> > kernel tree. I didn't apply any patch. The current lkp report and your
> > checking could be misleading.
> >
> > [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM
> > https://lore.kernel.org/all/20230707135852.24292-1-bhe@redhat.com,
> >
> > =====
> > AR drivers/iio/built-in.a
> > AR drivers/built-in.a
> > AR built-in.a
> > AR vmlinux.a
> > LD vmlinux.o
> > OBJCOPY modules.builtin.modinfo
> > GEN modules.builtin
> > MODPOST vmlinux.symvers
> > UPD include/generated/utsversion.h
> > CC init/version-timestamp.o
> > LD .tmp_vmlinux.kallsyms1
> > ld: drivers/clk/clk-fixed-mmio.o: in function `fixed_mmio_clk_setup':
> > clk-fixed-mmio.c:(.text+0x44): undefined reference to `of_iomap'
> > ld: clk-fixed-mmio.c:(.text+0x9c): undefined reference to `iounmap'
> > ld: drivers/pcmcia/cistpl.o: in function `set_cis_map':
> > cistpl.c:(.text+0x52a): undefined reference to `ioremap'
> > ld: cistpl.c:(.text+0x602): undefined reference to `iounmap'
> > ld: cistpl.c:(.text+0x650): undefined reference to `iounmap'
> > ld: cistpl.c:(.text+0x668): undefined reference to `ioremap'
> > ld: drivers/pcmcia/cistpl.o: in function `release_cis_mem':
> > cistpl.c:(.text+0x85c): undefined reference to `iounmap'
> > make[2]: *** [scripts/Makefile.vmlinux:36: vmlinux] Error 1
> > make[1]: *** [/root/linux/Makefile:1238: vmlinux] Error 2
> > make: *** [Makefile:234: __sub-make] Error 2
> >
> >
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-07-18 8:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13 2:57 [akpm-mm:mm-unstable 93/173] drivers/clk/clk-fixed-mmio.c:33:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations kernel test robot
2023-07-13 16:26 ` Andrew Morton
2023-07-13 23:59 ` Baoquan He
2023-07-14 18:08 ` Andrew Morton
2023-07-17 7:05 ` Liu, Yujie
2023-07-18 0:06 ` bhe
2023-07-18 6:19 ` Liu, Yujie
2023-07-18 8:47 ` bhe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).