From: kernel test robot <lkp@intel.com>
To: Himanshu Chauhan <hchauhan@ventanamicro.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Anup Patel <anup@brainfault.org>
Subject: [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
Date: Fri, 16 May 2025 05:07:09 +0800 [thread overview]
Message-ID: <202505160422.Ac5PTNaI-lkp@intel.com> (raw)
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
reply other threads:[~2025-05-15 21:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202505160422.Ac5PTNaI-lkp@intel.com \
--to=lkp@intel.com \
--cc=anup@brainfault.org \
--cc=hchauhan@ventanamicro.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.