oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [avpatel:riscv_raid6_rvv_v5 58/68] kernel/iomem.c:13:25: error: call to undeclared function 'ioremap_prot'; ISO C99 and later do not support implicit function declarations
@ 2025-05-15 21:07 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-15 21:07 UTC (permalink / raw)
  To: Himanshu Chauhan; +Cc: llvm, oe-kbuild-all, Anup Patel

tree:   https://github.com/avpatel/linux.git riscv_raid6_rvv_v5
head:   9b85cdf2ad159e2a8ee78d62c6b423942917119e
commit: ba7f462ebad5b1808e7252e72258434fcf86109b [58/68] riscv: Define ioremap_cache for RISC-V
config: riscv-nommu_k210_defconfig (https://download.01.org/0day-ci/archive/20250516/202505160422.Ac5PTNaI-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250516/202505160422.Ac5PTNaI-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/202505160422.Ac5PTNaI-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from kernel/iomem.c:4:
   In file included from include/linux/io.h:12:
   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:12:
   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:12:
   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:12:
   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:12:
   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:12:
   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:12:
   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:13:25: error: call to undeclared function 'ioremap_prot'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      13 |         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:13:25: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
      13 |         return (__force void *)ioremap_cache(offset, size);
         |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/io.h:34:3: note: expanded from macro 'ioremap_cache'
      34 |         ((__force void *)ioremap_prot((addr), (size), PAGE_KERNEL))
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   8 warnings and 1 error generated.


vim +/ioremap_prot +13 kernel/iomem.c

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

:::::: The code at line 13 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-05-15 21:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15 21:07 [avpatel:riscv_raid6_rvv_v5 58/68] kernel/iomem.c:13: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;
as well as URLs for NNTP newsgroup(s).