tree:
https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
head: 1a80b54d1ce1556bba6a8d8cd9384d6a9dcb641a
commit: abb95b7550f88bfb77081601f80662a259f2d143 [16/25] s390/pci: consolidate SR-IOV
specific code
config: s390-randconfig-r011-20200914 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
b2c32c90bab09a6e2c1f370429db26017a182143)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
git checkout abb95b7550f88bfb77081601f80662a259f2d143
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:19:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
^
In file included from arch/s390/pci/pci_iov.c:14:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from arch/s390/pci/pci_iov.c:14:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from arch/s390/pci/pci_iov.c:14:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from arch/s390/pci/pci_iov.c:14:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from arch/s390/pci/pci_iov.c:14:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
> arch/s390/pci/pci_iov.c:23:6: warning: no previous prototype for
function 'zpci_iov_map_resources' [-Wmissing-prototypes]
void
zpci_iov_map_resources(struct pci_dev *pdev)
^
arch/s390/pci/pci_iov.c:23:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void zpci_iov_map_resources(struct pci_dev *pdev)
^
static
> arch/s390/pci/pci_iov.c:38:6: warning: no previous prototype for
function 'zpci_iov_remove_virtfn' [-Wmissing-prototypes]
void
zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn)
^
arch/s390/pci/pci_iov.c:38:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn)
^
static
> arch/s390/pci/pci_iov.c:61:5: warning: no previous prototype for
function 'zpci_iov_setup_virtfn' [-Wmissing-prototypes]
int
zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn)
^
arch/s390/pci/pci_iov.c:61:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn)
^
static
23 warnings generated.
#
https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?id...
git remote add s390
https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
git fetch --no-tags s390 features
git checkout abb95b7550f88bfb77081601f80662a259f2d143
vim +/zpci_iov_map_resources +23 arch/s390/pci/pci_iov.c
22
23 void zpci_iov_map_resources(struct pci_dev *pdev)
24 {
25 resource_size_t len;
26 int i;
27
28 for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) {
29 int bar = i + PCI_IOV_RESOURCES;
30
31 len = pci_resource_len(pdev, bar);
32 if (!len)
33 continue;
34 pdev->resource[bar].parent = &iov_res;
35 }
36 }
37
38 void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn)
39 {
40 pci_lock_rescan_remove();
41 /* Linux' vfid's start at 0 vfn at 1 */
42 pci_iov_remove_virtfn(pdev->physfn, vfn - 1);
43 pci_unlock_rescan_remove();
44 }
45
46 static int zpci_iov_link_virtfn(struct pci_dev *pdev, struct pci_dev *virtfn, int
vfid)
47 {
48 int rc;
49
50 rc = pci_iov_sysfs_link(pdev, virtfn, vfid);
51 if (rc)
52 return rc;
53
54 virtfn->is_virtfn = 1;
55 virtfn->multifunction = 0;
56 virtfn->physfn = pci_dev_get(pdev);
57
58 return 0;
59 }
60
61 int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev
*virtfn, int vfn)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org