Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [avpatel:riscv_defconfig_v1 59/71] kernel/iomem.c:12:25: error: call to undeclared function 'ioremap_prot'; ISO C99 and later do not support implicit function declarations
@ 2025-02-01  9:44 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-01  9:44 UTC (permalink / raw)
  To: Himanshu Chauhan; +Cc: llvm, oe-kbuild-all, Anup Patel

tree:   https://github.com/avpatel/linux.git riscv_defconfig_v1
head:   151e6b62be87ee0e25a222878cbb915ea0a25a8a
commit: 59e1479f0e3cda391a9cb02cff086226ca15af76 [59/71] riscv: Define ioremap_cache for RISC-V
config: riscv-randconfig-001-20250201 (https://download.01.org/0day-ci/archive/20250201/202502011735.AvVTLWSn-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 355d0b186f178668b103068537e517f3d52ad639)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250201/202502011735.AvVTLWSn-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/202502011735.AvVTLWSn-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/iomem.c:4:
   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:139:
   include/asm-generic/io.h:804:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     804 |         insb(addr, buffer, count);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/io.h:107:53: note: expanded from macro 'insb'
     107 | #define insb(addr, buffer, count) __insb(PCI_IOBASE + (addr), buffer, count)
         |                                          ~~~~~~~~~~ ^
   In file included from kernel/iomem.c:4:
   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:139:
   include/asm-generic/io.h:812:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     812 |         insw(addr, buffer, count);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/io.h:108:53: note: expanded from macro 'insw'
     108 | #define insw(addr, buffer, count) __insw(PCI_IOBASE + (addr), buffer, count)
         |                                          ~~~~~~~~~~ ^
   In file included from kernel/iomem.c:4:
   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:139:
   include/asm-generic/io.h:820:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     820 |         insl(addr, buffer, count);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/io.h:109:53: note: expanded from macro 'insl'
     109 | #define insl(addr, buffer, count) __insl(PCI_IOBASE + (addr), buffer, count)
         |                                          ~~~~~~~~~~ ^
   In file included from kernel/iomem.c:4:
   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:139:
   include/asm-generic/io.h:829:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     829 |         outsb(addr, buffer, count);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/io.h:121:55: note: expanded from macro 'outsb'
     121 | #define outsb(addr, buffer, count) __outsb(PCI_IOBASE + (addr), buffer, count)
         |                                            ~~~~~~~~~~ ^
   In file included from kernel/iomem.c:4:
   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:139:
   include/asm-generic/io.h:838:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     838 |         outsw(addr, buffer, count);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/io.h:122:55: note: expanded from macro 'outsw'
     122 | #define outsw(addr, buffer, count) __outsw(PCI_IOBASE + (addr), buffer, count)
         |                                            ~~~~~~~~~~ ^
   In file included from kernel/iomem.c:4:
   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:139:
   include/asm-generic/io.h:847:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     847 |         outsl(addr, buffer, count);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/io.h:123:55: note: expanded from macro 'outsl'
     123 | #define outsl(addr, buffer, count) __outsl(PCI_IOBASE + (addr), buffer, count)
         |                                            ~~~~~~~~~~ ^
   In file included from kernel/iomem.c:4:
   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:139:
   include/asm-generic/io.h:1175:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
    1175 |         return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
         |                                                   ~~~~~~~~~~ ^
>> kernel/iomem.c:12:25: error: call to undeclared function 'ioremap_prot'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      12 |         return (__force void *)ioremap_cache(offset, size);
         |                                ^
   arch/riscv/include/asm/io.h:34:19: note: expanded from macro 'ioremap_cache'
      34 |         ((__force void *)ioremap_prot((addr), (size), _PAGE_KERNEL))
         |                          ^
>> kernel/iomem.c:12:25: error: use of undeclared identifier '_PAGE_KERNEL'
   arch/riscv/include/asm/io.h:34:48: note: expanded from macro 'ioremap_cache'
      34 |         ((__force void *)ioremap_prot((addr), (size), _PAGE_KERNEL))
         |                                                       ^
   7 warnings and 2 errors generated.


vim +/ioremap_prot +12 kernel/iomem.c

5981690ddb8f72 Dan Williams  2018-03-29   7  
5981690ddb8f72 Dan Williams  2018-03-29   8  #ifndef arch_memremap_wb
5981690ddb8f72 Dan Williams  2018-03-29   9  static void *arch_memremap_wb(resource_size_t offset, unsigned long size)
5981690ddb8f72 Dan Williams  2018-03-29  10  {
68af05143fd4b4 Arnd Bergmann 2023-07-26  11  #ifdef ioremap_cache
5981690ddb8f72 Dan Williams  2018-03-29 @12  	return (__force void *)ioremap_cache(offset, size);
68af05143fd4b4 Arnd Bergmann 2023-07-26  13  #else
68af05143fd4b4 Arnd Bergmann 2023-07-26  14  	return (__force void *)ioremap(offset, size);
68af05143fd4b4 Arnd Bergmann 2023-07-26  15  #endif
5981690ddb8f72 Dan Williams  2018-03-29  16  }
5981690ddb8f72 Dan Williams  2018-03-29  17  #endif
5981690ddb8f72 Dan Williams  2018-03-29  18  

:::::: The code at line 12 was first introduced by commit
:::::: 5981690ddb8f72f9546a2d017a914cf56095fc1f memremap: split devm_memremap_pages() and memremap() infrastructure

:::::: TO: Dan Williams <dan.j.williams@intel.com>
:::::: CC: Dan Williams <dan.j.williams@intel.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-01  9:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-01  9:44 [avpatel:riscv_defconfig_v1 59/71] kernel/iomem.c:12:25: error: call to undeclared function 'ioremap_prot'; ISO C99 and later do not support implicit function declarations kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox