All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jing Zhang <jingzhangos@google.com>, KVM <kvm@vger.kernel.org>,
	KVMARM <kvmarm@lists.cs.columbia.edu>,
	LinuxMIPS <linux-mips@vger.kernel.org>,
	KVMPPC <kvm-ppc@vger.kernel.org>,
	LinuxS390 <linux-s390@vger.kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Fuad Tabba <tabba@google.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Jing Zhang <jingzhangos@google.com>
Subject: Re: [PATCH 1/4] KVM: stats: Make sure no missing or mismatched binary stats definition
Date: Wed, 16 Jun 2021 20:55:33 +0800	[thread overview]
Message-ID: <202106162007.Ut8IJLnT-lkp@intel.com> (raw)
In-Reply-To: <20210614025351.365284-2-jingzhangos@google.com>

[-- Attachment #1: Type: text/plain, Size: 11375 bytes --]

Hi Jing,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on 39be2e28180a2e87af5fbb8d83643812e1a3b371]

url:    https://github.com/0day-ci/linux/commits/Jing-Zhang/Remove-duplicated-stats-definitions-for-debugfs/20210616-151523
base:   39be2e28180a2e87af5fbb8d83643812e1a3b371
config: s390-randconfig-r022-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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
        # https://github.com/0day-ci/linux/commit/2145147a4e85c8196c004804d103c1a3d7adeffe
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jing-Zhang/Remove-duplicated-stats-definitions-for-debugfs/20210616-151523
        git checkout 2145147a4e85c8196c004804d103c1a3d7adeffe
        # 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@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:35:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:35:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:35:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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/kvm/kvm-s390.c:63:2: error: implicit declaration of function 'STATS_DESC_COUNTR' [-Werror,-Wimplicit-function-declaration]
           STATS_DESC_COUNTR(VM, inject_io),
           ^
>> arch/s390/kvm/kvm-s390.c:63:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_io),
                             ^
>> arch/s390/kvm/kvm-s390.c:63:24: error: use of undeclared identifier 'inject_io'
           STATS_DESC_COUNTR(VM, inject_io),
                                 ^
   arch/s390/kvm/kvm-s390.c:64:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_float_mchk),
                             ^
>> arch/s390/kvm/kvm-s390.c:64:24: error: use of undeclared identifier 'inject_float_mchk'
           STATS_DESC_COUNTR(VM, inject_float_mchk),
                                 ^
   arch/s390/kvm/kvm-s390.c:65:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_pfault_done),
                             ^
>> arch/s390/kvm/kvm-s390.c:65:24: error: use of undeclared identifier 'inject_pfault_done'
           STATS_DESC_COUNTR(VM, inject_pfault_done),
                                 ^
   arch/s390/kvm/kvm-s390.c:66:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_service_signal),
                             ^
>> arch/s390/kvm/kvm-s390.c:66:24: error: use of undeclared identifier 'inject_service_signal'
           STATS_DESC_COUNTR(VM, inject_service_signal),
                                 ^
   arch/s390/kvm/kvm-s390.c:67:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_virtio)
                             ^
>> arch/s390/kvm/kvm-s390.c:67:24: error: use of undeclared identifier 'inject_virtio'
           STATS_DESC_COUNTR(VM, inject_virtio)
                                 ^
>> arch/s390/kvm/kvm-s390.c:69:15: error: invalid application of 'sizeof' to an incomplete type 'struct _kvm_stats_desc []'
   static_assert(ARRAY_SIZE(kvm_vm_stats_desc) ==
   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
   #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
                                    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
   #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
                                                          ^~~~
   arch/s390/kvm/kvm-s390.c:75:12: error: invalid application of 'sizeof' to an incomplete type 'struct _kvm_stats_desc []'
                   .count = ARRAY_SIZE(kvm_vm_stats_desc),
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^~~~~
   arch/s390/kvm/kvm-s390.c:78:10: error: invalid application of 'sizeof' to an incomplete type 'struct _kvm_stats_desc []'
                           sizeof(kvm_vm_stats_desc),
                                 ^~~~~~~~~~~~~~~~~~~
   12 warnings and 14 errors generated.


vim +/STATS_DESC_COUNTR +63 arch/s390/kvm/kvm-s390.c

    55	
    56	#define MEM_OP_MAX_SIZE 65536	/* Maximum transfer size for KVM_S390_MEM_OP */
    57	#define LOCAL_IRQS 32
    58	#define VCPU_IRQS_MAX_BUF (sizeof(struct kvm_s390_irq) * \
    59				   (KVM_MAX_VCPUS + LOCAL_IRQS))
    60	
    61	struct _kvm_stats_desc kvm_vm_stats_desc[] = {
    62		KVM_GENERIC_VM_STATS(),
  > 63		STATS_DESC_COUNTR(VM, inject_io),
  > 64		STATS_DESC_COUNTR(VM, inject_float_mchk),
  > 65		STATS_DESC_COUNTR(VM, inject_pfault_done),
  > 66		STATS_DESC_COUNTR(VM, inject_service_signal),
  > 67		STATS_DESC_COUNTR(VM, inject_virtio)
    68	};
  > 69	static_assert(ARRAY_SIZE(kvm_vm_stats_desc) ==
    70			sizeof(struct kvm_vm_stat) / sizeof(u64));
    71	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 18386 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Jing Zhang <jingzhangos@google.com>, KVM <kvm@vger.kernel.org>,
	KVMARM <kvmarm@lists.cs.columbia.edu>,
	LinuxMIPS <linux-mips@vger.kernel.org>,
	KVMPPC <kvm-ppc@vger.kernel.org>,
	LinuxS390 <linux-s390@vger.kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Fuad Tabba <tabba@google.com>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org
Subject: Re: [PATCH 1/4] KVM: stats: Make sure no missing or mismatched binary stats definition
Date: Wed, 16 Jun 2021 20:55:33 +0800	[thread overview]
Message-ID: <202106162007.Ut8IJLnT-lkp@intel.com> (raw)
In-Reply-To: <20210614025351.365284-2-jingzhangos@google.com>

[-- Attachment #1: Type: text/plain, Size: 11375 bytes --]

Hi Jing,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on 39be2e28180a2e87af5fbb8d83643812e1a3b371]

url:    https://github.com/0day-ci/linux/commits/Jing-Zhang/Remove-duplicated-stats-definitions-for-debugfs/20210616-151523
base:   39be2e28180a2e87af5fbb8d83643812e1a3b371
config: s390-randconfig-r022-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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
        # https://github.com/0day-ci/linux/commit/2145147a4e85c8196c004804d103c1a3d7adeffe
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jing-Zhang/Remove-duplicated-stats-definitions-for-debugfs/20210616-151523
        git checkout 2145147a4e85c8196c004804d103c1a3d7adeffe
        # 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@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:35:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:35:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:35:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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/kvm/kvm-s390.c:63:2: error: implicit declaration of function 'STATS_DESC_COUNTR' [-Werror,-Wimplicit-function-declaration]
           STATS_DESC_COUNTR(VM, inject_io),
           ^
>> arch/s390/kvm/kvm-s390.c:63:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_io),
                             ^
>> arch/s390/kvm/kvm-s390.c:63:24: error: use of undeclared identifier 'inject_io'
           STATS_DESC_COUNTR(VM, inject_io),
                                 ^
   arch/s390/kvm/kvm-s390.c:64:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_float_mchk),
                             ^
>> arch/s390/kvm/kvm-s390.c:64:24: error: use of undeclared identifier 'inject_float_mchk'
           STATS_DESC_COUNTR(VM, inject_float_mchk),
                                 ^
   arch/s390/kvm/kvm-s390.c:65:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_pfault_done),
                             ^
>> arch/s390/kvm/kvm-s390.c:65:24: error: use of undeclared identifier 'inject_pfault_done'
           STATS_DESC_COUNTR(VM, inject_pfault_done),
                                 ^
   arch/s390/kvm/kvm-s390.c:66:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_service_signal),
                             ^
>> arch/s390/kvm/kvm-s390.c:66:24: error: use of undeclared identifier 'inject_service_signal'
           STATS_DESC_COUNTR(VM, inject_service_signal),
                                 ^
   arch/s390/kvm/kvm-s390.c:67:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_virtio)
                             ^
>> arch/s390/kvm/kvm-s390.c:67:24: error: use of undeclared identifier 'inject_virtio'
           STATS_DESC_COUNTR(VM, inject_virtio)
                                 ^
>> arch/s390/kvm/kvm-s390.c:69:15: error: invalid application of 'sizeof' to an incomplete type 'struct _kvm_stats_desc []'
   static_assert(ARRAY_SIZE(kvm_vm_stats_desc) ==
   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
   #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
                                    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
   #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
                                                          ^~~~
   arch/s390/kvm/kvm-s390.c:75:12: error: invalid application of 'sizeof' to an incomplete type 'struct _kvm_stats_desc []'
                   .count = ARRAY_SIZE(kvm_vm_stats_desc),
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^~~~~
   arch/s390/kvm/kvm-s390.c:78:10: error: invalid application of 'sizeof' to an incomplete type 'struct _kvm_stats_desc []'
                           sizeof(kvm_vm_stats_desc),
                                 ^~~~~~~~~~~~~~~~~~~
   12 warnings and 14 errors generated.


vim +/STATS_DESC_COUNTR +63 arch/s390/kvm/kvm-s390.c

    55	
    56	#define MEM_OP_MAX_SIZE 65536	/* Maximum transfer size for KVM_S390_MEM_OP */
    57	#define LOCAL_IRQS 32
    58	#define VCPU_IRQS_MAX_BUF (sizeof(struct kvm_s390_irq) * \
    59				   (KVM_MAX_VCPUS + LOCAL_IRQS))
    60	
    61	struct _kvm_stats_desc kvm_vm_stats_desc[] = {
    62		KVM_GENERIC_VM_STATS(),
  > 63		STATS_DESC_COUNTR(VM, inject_io),
  > 64		STATS_DESC_COUNTR(VM, inject_float_mchk),
  > 65		STATS_DESC_COUNTR(VM, inject_pfault_done),
  > 66		STATS_DESC_COUNTR(VM, inject_service_signal),
  > 67		STATS_DESC_COUNTR(VM, inject_virtio)
    68	};
  > 69	static_assert(ARRAY_SIZE(kvm_vm_stats_desc) ==
    70			sizeof(struct kvm_vm_stat) / sizeof(u64));
    71	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 18386 bytes --]

[-- Attachment #3: Type: text/plain, Size: 151 bytes --]

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/4] KVM: stats: Make sure no missing or mismatched binary stats definition
Date: Wed, 16 Jun 2021 20:55:33 +0800	[thread overview]
Message-ID: <202106162007.Ut8IJLnT-lkp@intel.com> (raw)
In-Reply-To: <20210614025351.365284-2-jingzhangos@google.com>

[-- Attachment #1: Type: text/plain, Size: 11565 bytes --]

Hi Jing,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on 39be2e28180a2e87af5fbb8d83643812e1a3b371]

url:    https://github.com/0day-ci/linux/commits/Jing-Zhang/Remove-duplicated-stats-definitions-for-debugfs/20210616-151523
base:   39be2e28180a2e87af5fbb8d83643812e1a3b371
config: s390-randconfig-r022-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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
        # https://github.com/0day-ci/linux/commit/2145147a4e85c8196c004804d103c1a3d7adeffe
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jing-Zhang/Remove-duplicated-stats-definitions-for-debugfs/20210616-151523
        git checkout 2145147a4e85c8196c004804d103c1a3d7adeffe
        # 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@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:35:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:35:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:35:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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/kvm/kvm-s390.c:63:2: error: implicit declaration of function 'STATS_DESC_COUNTR' [-Werror,-Wimplicit-function-declaration]
           STATS_DESC_COUNTR(VM, inject_io),
           ^
>> arch/s390/kvm/kvm-s390.c:63:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_io),
                             ^
>> arch/s390/kvm/kvm-s390.c:63:24: error: use of undeclared identifier 'inject_io'
           STATS_DESC_COUNTR(VM, inject_io),
                                 ^
   arch/s390/kvm/kvm-s390.c:64:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_float_mchk),
                             ^
>> arch/s390/kvm/kvm-s390.c:64:24: error: use of undeclared identifier 'inject_float_mchk'
           STATS_DESC_COUNTR(VM, inject_float_mchk),
                                 ^
   arch/s390/kvm/kvm-s390.c:65:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_pfault_done),
                             ^
>> arch/s390/kvm/kvm-s390.c:65:24: error: use of undeclared identifier 'inject_pfault_done'
           STATS_DESC_COUNTR(VM, inject_pfault_done),
                                 ^
   arch/s390/kvm/kvm-s390.c:66:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_service_signal),
                             ^
>> arch/s390/kvm/kvm-s390.c:66:24: error: use of undeclared identifier 'inject_service_signal'
           STATS_DESC_COUNTR(VM, inject_service_signal),
                                 ^
   arch/s390/kvm/kvm-s390.c:67:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_virtio)
                             ^
>> arch/s390/kvm/kvm-s390.c:67:24: error: use of undeclared identifier 'inject_virtio'
           STATS_DESC_COUNTR(VM, inject_virtio)
                                 ^
>> arch/s390/kvm/kvm-s390.c:69:15: error: invalid application of 'sizeof' to an incomplete type 'struct _kvm_stats_desc []'
   static_assert(ARRAY_SIZE(kvm_vm_stats_desc) ==
   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
   #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
                                    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
   #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
                                                          ^~~~
   arch/s390/kvm/kvm-s390.c:75:12: error: invalid application of 'sizeof' to an incomplete type 'struct _kvm_stats_desc []'
                   .count = ARRAY_SIZE(kvm_vm_stats_desc),
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^~~~~
   arch/s390/kvm/kvm-s390.c:78:10: error: invalid application of 'sizeof' to an incomplete type 'struct _kvm_stats_desc []'
                           sizeof(kvm_vm_stats_desc),
                                 ^~~~~~~~~~~~~~~~~~~
   12 warnings and 14 errors generated.


vim +/STATS_DESC_COUNTR +63 arch/s390/kvm/kvm-s390.c

    55	
    56	#define MEM_OP_MAX_SIZE 65536	/* Maximum transfer size for KVM_S390_MEM_OP */
    57	#define LOCAL_IRQS 32
    58	#define VCPU_IRQS_MAX_BUF (sizeof(struct kvm_s390_irq) * \
    59				   (KVM_MAX_VCPUS + LOCAL_IRQS))
    60	
    61	struct _kvm_stats_desc kvm_vm_stats_desc[] = {
    62		KVM_GENERIC_VM_STATS(),
  > 63		STATS_DESC_COUNTR(VM, inject_io),
  > 64		STATS_DESC_COUNTR(VM, inject_float_mchk),
  > 65		STATS_DESC_COUNTR(VM, inject_pfault_done),
  > 66		STATS_DESC_COUNTR(VM, inject_service_signal),
  > 67		STATS_DESC_COUNTR(VM, inject_virtio)
    68	};
  > 69	static_assert(ARRAY_SIZE(kvm_vm_stats_desc) ==
    70			sizeof(struct kvm_vm_stat) / sizeof(u64));
    71	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 18386 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Jing Zhang <jingzhangos@google.com>, KVM <kvm@vger.kernel.org>,
	KVMARM <kvmarm@lists.cs.columbia.edu>,
	LinuxMIPS <linux-mips@vger.kernel.org>,
	KVMPPC <kvm-ppc@vger.kernel.org>,
	LinuxS390 <linux-s390@vger.kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Fuad Tabba <tabba@google.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Jing Zhang <jingzhangos@google.com>
Subject: Re: [PATCH 1/4] KVM: stats: Make sure no missing or mismatched binary stats definition
Date: Wed, 16 Jun 2021 12:55:33 +0000	[thread overview]
Message-ID: <202106162007.Ut8IJLnT-lkp@intel.com> (raw)
In-Reply-To: <20210614025351.365284-2-jingzhangos@google.com>

[-- Attachment #1: Type: text/plain, Size: 11375 bytes --]

Hi Jing,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on 39be2e28180a2e87af5fbb8d83643812e1a3b371]

url:    https://github.com/0day-ci/linux/commits/Jing-Zhang/Remove-duplicated-stats-definitions-for-debugfs/20210616-151523
base:   39be2e28180a2e87af5fbb8d83643812e1a3b371
config: s390-randconfig-r022-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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
        # https://github.com/0day-ci/linux/commit/2145147a4e85c8196c004804d103c1a3d7adeffe
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jing-Zhang/Remove-duplicated-stats-definitions-for-debugfs/20210616-151523
        git checkout 2145147a4e85c8196c004804d103c1a3d7adeffe
        # 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@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:35:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:35:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:35:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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/kvm/kvm-s390.c:63:2: error: implicit declaration of function 'STATS_DESC_COUNTR' [-Werror,-Wimplicit-function-declaration]
           STATS_DESC_COUNTR(VM, inject_io),
           ^
>> arch/s390/kvm/kvm-s390.c:63:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_io),
                             ^
>> arch/s390/kvm/kvm-s390.c:63:24: error: use of undeclared identifier 'inject_io'
           STATS_DESC_COUNTR(VM, inject_io),
                                 ^
   arch/s390/kvm/kvm-s390.c:64:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_float_mchk),
                             ^
>> arch/s390/kvm/kvm-s390.c:64:24: error: use of undeclared identifier 'inject_float_mchk'
           STATS_DESC_COUNTR(VM, inject_float_mchk),
                                 ^
   arch/s390/kvm/kvm-s390.c:65:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_pfault_done),
                             ^
>> arch/s390/kvm/kvm-s390.c:65:24: error: use of undeclared identifier 'inject_pfault_done'
           STATS_DESC_COUNTR(VM, inject_pfault_done),
                                 ^
   arch/s390/kvm/kvm-s390.c:66:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_service_signal),
                             ^
>> arch/s390/kvm/kvm-s390.c:66:24: error: use of undeclared identifier 'inject_service_signal'
           STATS_DESC_COUNTR(VM, inject_service_signal),
                                 ^
   arch/s390/kvm/kvm-s390.c:67:20: error: use of undeclared identifier 'VM'
           STATS_DESC_COUNTR(VM, inject_virtio)
                             ^
>> arch/s390/kvm/kvm-s390.c:67:24: error: use of undeclared identifier 'inject_virtio'
           STATS_DESC_COUNTR(VM, inject_virtio)
                                 ^
>> arch/s390/kvm/kvm-s390.c:69:15: error: invalid application of 'sizeof' to an incomplete type 'struct _kvm_stats_desc []'
   static_assert(ARRAY_SIZE(kvm_vm_stats_desc) ==
   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
   #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
                                    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
   #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
                                                          ^~~~
   arch/s390/kvm/kvm-s390.c:75:12: error: invalid application of 'sizeof' to an incomplete type 'struct _kvm_stats_desc []'
                   .count = ARRAY_SIZE(kvm_vm_stats_desc),
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^~~~~
   arch/s390/kvm/kvm-s390.c:78:10: error: invalid application of 'sizeof' to an incomplete type 'struct _kvm_stats_desc []'
                           sizeof(kvm_vm_stats_desc),
                                 ^~~~~~~~~~~~~~~~~~~
   12 warnings and 14 errors generated.


vim +/STATS_DESC_COUNTR +63 arch/s390/kvm/kvm-s390.c

    55	
    56	#define MEM_OP_MAX_SIZE 65536	/* Maximum transfer size for KVM_S390_MEM_OP */
    57	#define LOCAL_IRQS 32
    58	#define VCPU_IRQS_MAX_BUF (sizeof(struct kvm_s390_irq) * \
    59				   (KVM_MAX_VCPUS + LOCAL_IRQS))
    60	
    61	struct _kvm_stats_desc kvm_vm_stats_desc[] = {
    62		KVM_GENERIC_VM_STATS(),
  > 63		STATS_DESC_COUNTR(VM, inject_io),
  > 64		STATS_DESC_COUNTR(VM, inject_float_mchk),
  > 65		STATS_DESC_COUNTR(VM, inject_pfault_done),
  > 66		STATS_DESC_COUNTR(VM, inject_service_signal),
  > 67		STATS_DESC_COUNTR(VM, inject_virtio)
    68	};
  > 69	static_assert(ARRAY_SIZE(kvm_vm_stats_desc) ==
    70			sizeof(struct kvm_vm_stat) / sizeof(u64));
    71	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 18386 bytes --]

  parent reply	other threads:[~2021-06-16 12:55 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14  2:53 [PATCH 0/4] Remove duplicated stats definitions for debugfs Jing Zhang
2021-06-14  2:53 ` Jing Zhang
2021-06-14  2:53 ` [PATCH 1/4] KVM: stats: Make sure no missing or mismatched binary stats definition Jing Zhang
2021-06-14  2:53   ` Jing Zhang
2021-06-14  2:53   ` Jing Zhang
2021-06-14  9:49   ` Fuad Tabba
2021-06-14  9:49     ` Fuad Tabba
2021-06-14  9:49     ` Fuad Tabba
2021-06-14 13:28     ` Jing Zhang
2021-06-14 13:28       ` Jing Zhang
2021-06-14 13:28       ` Jing Zhang
2021-06-16 12:55   ` kernel test robot [this message]
2021-06-16 12:55     ` kernel test robot
2021-06-16 12:55     ` kernel test robot
2021-06-16 12:55     ` kernel test robot
2021-06-14  2:53 ` [PATCH 2/4] KVM: stats: Use binary stats descriptors for debugfs interface Jing Zhang
2021-06-14  2:53   ` Jing Zhang
2021-06-14  2:53   ` Jing Zhang
2021-06-14  9:51   ` Paolo Bonzini
2021-06-14  9:51     ` Paolo Bonzini
2021-06-14  9:51     ` Paolo Bonzini
2021-06-14 13:36     ` Jing Zhang
2021-06-14 13:36       ` Jing Zhang
2021-06-14 13:36       ` Jing Zhang
2021-06-14  2:53 ` [PATCH 3/4] KVM: stats: Update documentation supporting stats mode and offset Jing Zhang
2021-06-14  2:53   ` Jing Zhang
2021-06-14  2:53 ` [PATCH 4/4] KVM: selftests: Update binary stats test for stats mode Jing Zhang
2021-06-14  2:53   ` Jing Zhang
2021-06-14  9:53 ` [PATCH 0/4] Remove duplicated stats definitions for debugfs Paolo Bonzini
2021-06-14  9:53   ` Paolo Bonzini
2021-06-14  9:53   ` Paolo Bonzini
2021-06-14 13:38   ` Jing Zhang
2021-06-14 13:38     ` Jing Zhang
2021-06-14 13:38     ` Jing Zhang
2021-06-16 13:45 [PATCH 1/4] KVM: stats: Make sure no missing or mismatched binary stats definition kernel test robot

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=202106162007.Ut8IJLnT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jingzhangos@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=tabba@google.com \
    /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.