tree:
https://github.com/sbates130272/linux-p2pmem.git martin/map_sg_cleanup
head: 820685259796d140a9daaf67c2889a188f0080f6
commit: 03f23088d07a92e502728eb2234a6ed52ea7794a [11/15] sparc: return error code from
iommu_tbl_range_alloc()
config: sparc-randconfig-p001-20210621 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
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
#
https://github.com/sbates130272/linux-p2pmem/commit/03f23088d07a92e502728...
git remote add p2pmem
https://github.com/sbates130272/linux-p2pmem.git
git fetch --no-tags p2pmem martin/map_sg_cleanup
git checkout 03f23088d07a92e502728eb2234a6ed52ea7794a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/sparc/kernel/iommu.c: In function 'alloc_npages':
> arch/sparc/kernel/iommu.c:165:3: error: expected ')'
before 'return'
165 | return NULL;
| ^~~~~~
arch/sparc/kernel/iommu.c:164:5: note: to match this '('
164 | if (unlikely((entry < 0))
| ^
> arch/sparc/kernel/iommu.c:168:1: error: expected expression
before '}' token
168 | }
| ^
arch/sparc/kernel/iommu.c:168:1: error: no return statement in function returning
non-void [-Werror=return-type]
cc1: all warnings being treated as errors
--
> arch/sparc/kernel/iommu-common.c:97:6: error: conflicting types
for 'iommu_tbl_range_alloc'
97 | long iommu_tbl_range_alloc(struct
device *dev,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from arch/sparc/kernel/iommu-common.c:13:
arch/sparc/include/asm/iommu-common.h:42:22: note: previous declaration of
'iommu_tbl_range_alloc' was here
42 | extern unsigned long iommu_tbl_range_alloc(struct device *dev,
| ^~~~~~~~~~~~~~~~~~~~~
vim +165 arch/sparc/kernel/iommu.c
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 155
bb620c3d3925aec arch/sparc/kernel/iommu.c Sowmini Varadhan 2015-04-09 156 static
inline iopte_t *alloc_npages(struct device *dev,
bb620c3d3925aec arch/sparc/kernel/iommu.c Sowmini Varadhan 2015-04-09 157
struct iommu *iommu,
d284142cbad6683 arch/sparc64/kernel/iommu.c David S. Miller 2008-02-08 158
unsigned long npages)
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 159 {
03f23088d07a92e arch/sparc/kernel/iommu.c Martin Oliveira 2021-06-21 160 long
entry;
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 161
bb620c3d3925aec arch/sparc/kernel/iommu.c Sowmini Varadhan 2015-04-09 162 entry =
iommu_tbl_range_alloc(dev, &iommu->tbl, npages, NULL,
bb620c3d3925aec arch/sparc/kernel/iommu.c Sowmini Varadhan 2015-04-09 163
(unsigned long)(-1), 0);
03f23088d07a92e arch/sparc/kernel/iommu.c Martin Oliveira 2021-06-21 164 if
(unlikely((entry < 0))
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 @165 return
NULL;
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 166
03f23088d07a92e arch/sparc/kernel/iommu.c Martin Oliveira 2021-06-21 167 return
iommu->page_table + (unsigned long) entry;
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 @168 }
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 169
:::::: The code at line 165 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org