[niks:has_ioport_v3 39/39] include/asm-generic/io.h:737:9: warning: 'insb' macro redefined

From: kernel test robot
Date: Wed May 04 2022 - 01:39:09 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git has_ioport_v3
head: 45df38c1492340a5c06ff7ad2966735c1f5c4d94
commit: 45df38c1492340a5c06ff7ad2966735c1f5c4d94 [39/39] asm-generic/io.h: drop inb() etc for HAS_IOPORT=n
config: riscv-randconfig-r003-20220501 (https://download.01.org/0day-ci/archive/20220504/202205041331.P2Djdwnj-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 363b3a645a1e30011cc8da624f13dac5fd915628)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git/commit/?id=45df38c1492340a5c06ff7ad2966735c1f5c4d94
git remote add niks https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git
git fetch --no-tags niks has_ioport_v3
git checkout 45df38c1492340a5c06ff7ad2966735c1f5c4d94
# 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=riscv SHELL=/bin/bash drivers/target/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from drivers/target/target_core_configfs.c:28:
In file included from include/linux/syscalls.h:88:
In file included from include/trace/syscall.h:7:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
>> include/asm-generic/io.h:737:9: warning: 'insb' macro redefined [-Wmacro-redefined]
#define insb insb
^
arch/riscv/include/asm/io.h:104:9: note: previous definition is here
#define insb(addr, buffer, count) __insb((void __iomem *)(long)addr, buffer, count)
^
In file included from drivers/target/target_core_configfs.c:28:
In file included from include/linux/syscalls.h:88:
In file included from include/trace/syscall.h:7:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
>> include/asm-generic/io.h:740:9: warning: 'insw' macro redefined [-Wmacro-redefined]
#define insw insw
^
arch/riscv/include/asm/io.h:105:9: note: previous definition is here
#define insw(addr, buffer, count) __insw((void __iomem *)(long)addr, buffer, count)
^
In file included from drivers/target/target_core_configfs.c:28:
In file included from include/linux/syscalls.h:88:
In file included from include/trace/syscall.h:7:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
>> include/asm-generic/io.h:743:9: warning: 'insl' macro redefined [-Wmacro-redefined]
#define insl insl
^
arch/riscv/include/asm/io.h:106:9: note: previous definition is here
#define insl(addr, buffer, count) __insl((void __iomem *)(long)addr, buffer, count)
^
In file included from drivers/target/target_core_configfs.c:28:
In file included from include/linux/syscalls.h:88:
In file included from include/trace/syscall.h:7:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
>> include/asm-generic/io.h:746:9: warning: 'outsb' macro redefined [-Wmacro-redefined]
#define outsb outsb
^
arch/riscv/include/asm/io.h:118:9: note: previous definition is here
#define outsb(addr, buffer, count) __outsb((void __iomem *)(long)addr, buffer, count)
^
In file included from drivers/target/target_core_configfs.c:28:
In file included from include/linux/syscalls.h:88:
In file included from include/trace/syscall.h:7:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
>> include/asm-generic/io.h:749:9: warning: 'outsw' macro redefined [-Wmacro-redefined]
#define outsw outsw
^
arch/riscv/include/asm/io.h:119:9: note: previous definition is here
#define outsw(addr, buffer, count) __outsw((void __iomem *)(long)addr, buffer, count)
^
In file included from drivers/target/target_core_configfs.c:28:
In file included from include/linux/syscalls.h:88:
In file included from include/trace/syscall.h:7:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
>> include/asm-generic/io.h:752:9: warning: 'outsl' macro redefined [-Wmacro-redefined]
#define outsl outsl
^
arch/riscv/include/asm/io.h:120:9: note: previous definition is here
#define outsl(addr, buffer, count) __outsl((void __iomem *)(long)addr, buffer, count)
^
In file included from drivers/target/target_core_configfs.c:28:
In file included from include/linux/syscalls.h:88:
In file included from include/trace/syscall.h:7:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:1081:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
fatal error: too many errors emitted, stopping now [-ferror-limit=]
7 warnings and 20 errors generated.
--
In file included from drivers/target/target_core_spc.c:16:
In file included from include/scsi/scsi_tcq.h:5:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
>> include/asm-generic/io.h:737:9: warning: 'insb' macro redefined [-Wmacro-redefined]
#define insb insb
^
arch/riscv/include/asm/io.h:104:9: note: previous definition is here
#define insb(addr, buffer, count) __insb((void __iomem *)(long)addr, buffer, count)
^
In file included from drivers/target/target_core_spc.c:16:
In file included from include/scsi/scsi_tcq.h:5:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
>> include/asm-generic/io.h:740:9: warning: 'insw' macro redefined [-Wmacro-redefined]
#define insw insw
^
arch/riscv/include/asm/io.h:105:9: note: previous definition is here
#define insw(addr, buffer, count) __insw((void __iomem *)(long)addr, buffer, count)
^
In file included from drivers/target/target_core_spc.c:16:
In file included from include/scsi/scsi_tcq.h:5:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
>> include/asm-generic/io.h:743:9: warning: 'insl' macro redefined [-Wmacro-redefined]
#define insl insl
^
arch/riscv/include/asm/io.h:106:9: note: previous definition is here
#define insl(addr, buffer, count) __insl((void __iomem *)(long)addr, buffer, count)
^
In file included from drivers/target/target_core_spc.c:16:
In file included from include/scsi/scsi_tcq.h:5:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
>> include/asm-generic/io.h:746:9: warning: 'outsb' macro redefined [-Wmacro-redefined]
#define outsb outsb
^
arch/riscv/include/asm/io.h:118:9: note: previous definition is here
#define outsb(addr, buffer, count) __outsb((void __iomem *)(long)addr, buffer, count)
^
In file included from drivers/target/target_core_spc.c:16:
In file included from include/scsi/scsi_tcq.h:5:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
>> include/asm-generic/io.h:749:9: warning: 'outsw' macro redefined [-Wmacro-redefined]
#define outsw outsw
^
arch/riscv/include/asm/io.h:119:9: note: previous definition is here
#define outsw(addr, buffer, count) __outsw((void __iomem *)(long)addr, buffer, count)
^
In file included from drivers/target/target_core_spc.c:16:
In file included from include/scsi/scsi_tcq.h:5:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
>> include/asm-generic/io.h:752:9: warning: 'outsl' macro redefined [-Wmacro-redefined]
#define outsl outsl
^
arch/riscv/include/asm/io.h:120:9: note: previous definition is here
#define outsl(addr, buffer, count) __outsl((void __iomem *)(long)addr, buffer, count)
^
In file included from drivers/target/target_core_spc.c:16:
In file included from include/scsi/scsi_tcq.h:5:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:1081:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
drivers/target/target_core_spc.c:223:6: warning: variable 'prod_len' set but not used [-Wunused-but-set-variable]
u32 prod_len;
^
drivers/target/target_core_spc.c:224:6: warning: variable 'unit_serial_len' set but not used [-Wunused-but-set-variable]
u32 unit_serial_len, off = 0;
^
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
fatal error: too many errors emitted, stopping now [-ferror-limit=]
9 warnings and 20 errors generated.


vim +/insb +737 include/asm-generic/io.h

736
> 737 #define insb insb
738 void insb(unsigned long addr, void *buffer, unsigned int count)
739 __compiletime_error("insb()/insb_p() requires CONFIG_HAS_IOPORT");
> 740 #define insw insw
741 void insw(unsigned long addr, void *buffer, unsigned int count)
742 __compiletime_error("insw()/insw_p() requires CONFIG_HAS_IOPORT");
> 743 #define insl insl
744 void insl(unsigned long addr, void *buffer, unsigned int count)
745 __compiletime_error("insl()/insl_p() requires CONFIG_HAS_IOPORT");
> 746 #define outsb outsb
747 void outsb(unsigned long addr, const void *buffer, unsigned int count)
748 __compiletime_error("outsb()/outsb_p() requires CONFIG_HAS_IOPORT");
> 749 #define outsw outsw
750 void outsw(unsigned long addr, const void *buffer, unsigned int count)
751 __compiletime_error("outsw()/outsw_p() requires CONFIG_HAS_IOPORT");
> 752 #define outsl outsl
753 void outsl(unsigned long addr, const void *buffer, unsigned int count)
754 __compiletime_error("outsl()/outsl_p() requires CONFIG_HAS_IOPORT");
755

--
0-DAY CI Kernel Test Service
https://01.org/lkp