[pm:acpica-osl 3/3] drivers/acpi/osl.c:1608 acpi_release_memory() warn: ignoring unreachable code.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpica-osl
head: 3537ee81aa84bbcf47f7239f1053686d71bea47d
commit: 3537ee81aa84bbcf47f7239f1053686d71bea47d [3/3] ACPI: OSL: Define ACPI_OS_MAP_MEMORY_FAST_PATH()
config: i386-randconfig-m021-20200611 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/acpi/osl.c:1608 acpi_release_memory() warn: ignoring unreachable code.
# https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commi...
git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git remote update pm
git checkout 3537ee81aa84bbcf47f7239f1053686d71bea47d
vim +1608 drivers/acpi/osl.c
d2d2e3c46be5d6 Heikki Krogerus 2018-06-21 1599 acpi_status acpi_release_memory(acpi_handle handle, struct resource *res,
d2d2e3c46be5d6 Heikki Krogerus 2018-06-21 1600 u32 level)
d2d2e3c46be5d6 Heikki Krogerus 2018-06-21 1601 {
d2d2e3c46be5d6 Heikki Krogerus 2018-06-21 1602 if (!(res->flags & IORESOURCE_MEM))
d2d2e3c46be5d6 Heikki Krogerus 2018-06-21 1603 return AE_TYPE;
d2d2e3c46be5d6 Heikki Krogerus 2018-06-21 1604
d2d2e3c46be5d6 Heikki Krogerus 2018-06-21 1605 return acpi_walk_namespace(ACPI_TYPE_REGION, handle, level,
^^^^^^
d2d2e3c46be5d6 Heikki Krogerus 2018-06-21 1606 acpi_deactivate_mem_region, NULL, res, NULL);
3537ee81aa84bb Rafael J. Wysocki 2020-06-10 1607
3537ee81aa84bb Rafael J. Wysocki 2020-06-10 @1608 acpi_release_unused_memory_mappings();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unreachable.
d2d2e3c46be5d6 Heikki Krogerus 2018-06-21 1609 }
d2d2e3c46be5d6 Heikki Krogerus 2018-06-21 1610 EXPORT_SYMBOL_GPL(acpi_release_memory);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[wsa:i2c/for-5.8 98/102] drivers/i2c/busses/i2c-npcm7xx.c:127:11: sparse: sparse: symbol 'npcm_i2caddr' was not declared. Should it be
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-5.8
head: cb301414763e07e4cef58c9d5ef3750d1f9539bc
commit: f54736925a4f83a67588381d0ead69d19323b526 [98/102] i2c: npcm7xx: Add support for slave mode for Nuvoton
config: i386-randconfig-s001-20200611 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-247-gcadbd124-dirty
git checkout f54736925a4f83a67588381d0ead69d19323b526
# save the attached .config to linux build tree
make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/i2c/busses/i2c-npcm7xx.c:127:11: sparse: sparse: symbol 'npcm_i2caddr' was not declared. Should it be static?
>> drivers/i2c/busses/i2c-npcm7xx.c:1115:61: sparse: sparse: Using plain integer as NULL pointer
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v4] sco:Add support for BT_PKT_STATUS CMSG data
by kernel test robot
Hi Alain,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on next-20200611]
[cannot apply to bluetooth/master v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Alain-Michaud/sco-Add-support-fo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: sh-randconfig-s032-20200611 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=sh CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
net/bluetooth/sco.c:826:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] <asn:1> * @@
net/bluetooth/sco.c:826:21: sparse: expected unsigned int const *__gu_addr
net/bluetooth/sco.c:826:21: sparse: got unsigned int [noderef] [usertype] <asn:1> *
net/bluetooth/sco.c:826:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:1> * @@ got unsigned int const *__gu_addr @@
net/bluetooth/sco.c:826:21: sparse: expected void const volatile [noderef] <asn:1> *
net/bluetooth/sco.c:826:21: sparse: got unsigned int const *__gu_addr
>> net/bluetooth/sco.c:863:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] <asn:1> * @@
net/bluetooth/sco.c:863:21: sparse: expected int const *__gu_addr
>> net/bluetooth/sco.c:863:21: sparse: got int [noderef] <asn:1> *
net/bluetooth/sco.c:863:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:1> * @@ got int const *__gu_addr @@
net/bluetooth/sco.c:863:21: sparse: expected void const volatile [noderef] <asn:1> *
net/bluetooth/sco.c:863:21: sparse: got int const *__gu_addr
net/bluetooth/sco.c:893:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] <asn:1> *optlen @@
net/bluetooth/sco.c:893:13: sparse: expected int const *__gu_addr
net/bluetooth/sco.c:893:13: sparse: got int [noderef] <asn:1> *optlen
net/bluetooth/sco.c:893:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:1> * @@ got int const *__gu_addr @@
net/bluetooth/sco.c:893:13: sparse: expected void const volatile [noderef] <asn:1> *
net/bluetooth/sco.c:893:13: sparse: got int const *__gu_addr
net/bluetooth/sco.c:958:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] <asn:1> *optlen @@
net/bluetooth/sco.c:958:13: sparse: expected int const *__gu_addr
net/bluetooth/sco.c:958:13: sparse: got int [noderef] <asn:1> *optlen
net/bluetooth/sco.c:958:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:1> * @@ got int const *__gu_addr @@
net/bluetooth/sco.c:958:13: sparse: expected void const volatile [noderef] <asn:1> *
net/bluetooth/sco.c:958:13: sparse: got int const *__gu_addr
vim +863 net/bluetooth/sco.c
804
805 static int sco_sock_setsockopt(struct socket *sock, int level, int optname,
806 char __user *optval, unsigned int optlen)
807 {
808 struct sock *sk = sock->sk;
809 int len, err = 0;
810 struct bt_voice voice;
811 u32 opt;
812 int pkt_status;
813
814 BT_DBG("sk %p", sk);
815
816 lock_sock(sk);
817
818 switch (optname) {
819
820 case BT_DEFER_SETUP:
821 if (sk->sk_state != BT_BOUND && sk->sk_state != BT_LISTEN) {
822 err = -EINVAL;
823 break;
824 }
825
> 826 if (get_user(opt, (u32 __user *) optval)) {
827 err = -EFAULT;
828 break;
829 }
830
831 if (opt)
832 set_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
833 else
834 clear_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
835 break;
836
837 case BT_VOICE:
838 if (sk->sk_state != BT_OPEN && sk->sk_state != BT_BOUND &&
839 sk->sk_state != BT_CONNECT2) {
840 err = -EINVAL;
841 break;
842 }
843
844 voice.setting = sco_pi(sk)->setting;
845
846 len = min_t(unsigned int, sizeof(voice), optlen);
847 if (copy_from_user((char *)&voice, optval, len)) {
848 err = -EFAULT;
849 break;
850 }
851
852 /* Explicitly check for these values */
853 if (voice.setting != BT_VOICE_TRANSPARENT &&
854 voice.setting != BT_VOICE_CVSD_16BIT) {
855 err = -EINVAL;
856 break;
857 }
858
859 sco_pi(sk)->setting = voice.setting;
860 break;
861
862 case BT_PKT_STATUS:
> 863 if (get_user(pkt_status, (int __user *)optval)) {
864 err = -EFAULT;
865 break;
866 }
867
868 if (pkt_status)
869 set_bit(BT_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
870 else
871 clear_bit(BT_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
872 break;
873
874 default:
875 err = -ENOPROTOOPT;
876 break;
877 }
878
879 release_sock(sk);
880 return err;
881 }
882
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[hch-block:sas-atapi-fix 1/2] include/linux/export.h:99:20: error: pasting "__kstrtab_" and "(" does not give a valid preprocessing token
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git sas-atapi-fix
head: af06c6f5072be6e47fa1a4641f5305c112e1d430
commit: 1c4b5642165ae807d42b4a447573620b22445f8e [1/2] libata: provide a ata_scsi_dma_need_drain stub for !CONFIG_ATA
config: s390-allmodconfig (attached as .config)
compiler: s390-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
git checkout 1c4b5642165ae807d42b4a447573620b22445f8e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 error/warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/compat.h:9,
from drivers/ata/libata-scsi.c:16:
>> include/linux/stddef.h:8:16: error: expected identifier or '(' before 'void'
8 | #define NULL ((void *)0)
| ^~~~
>> include/linux/libata.h:1098:33: note: in expansion of macro 'NULL'
1098 | #define ata_scsi_dma_need_drain NULL
| ^~~~
>> drivers/ata/libata-scsi.c:1020:6: note: in expansion of macro 'ata_scsi_dma_need_drain'
1020 | bool ata_scsi_dma_need_drain(struct request *rq)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/stddef.h:8:23: error: expected ')' before numeric constant
8 | #define NULL ((void *)0)
| ^
>> include/linux/libata.h:1098:33: note: in expansion of macro 'NULL'
1098 | #define ata_scsi_dma_need_drain NULL
| ^~~~
>> drivers/ata/libata-scsi.c:1020:6: note: in expansion of macro 'ata_scsi_dma_need_drain'
1020 | bool ata_scsi_dma_need_drain(struct request *rq)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/preempt.h:10,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/compat.h:10,
from drivers/ata/libata-scsi.c:16:
>> include/linux/stddef.h:8:16: error: expected identifier or '(' before 'void'
8 | #define NULL ((void *)0)
| ^~~~
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; | ^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
>> drivers/ata/libata-scsi.c:1024:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~
>> include/linux/libata.h:1098:33: note: in expansion of macro 'NULL'
1098 | #define ata_scsi_dma_need_drain NULL
| ^~~~
drivers/ata/libata-scsi.c:1024:19: note: in expansion of macro 'ata_scsi_dma_need_drain'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/stddef.h:8:23: error: expected ')' before numeric constant
8 | #define NULL ((void *)0)
| ^
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; | ^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
>> drivers/ata/libata-scsi.c:1024:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~
>> include/linux/libata.h:1098:33: note: in expansion of macro 'NULL'
1098 | #define ata_scsi_dma_need_drain NULL
| ^~~~
drivers/ata/libata-scsi.c:1024:19: note: in expansion of macro 'ata_scsi_dma_need_drain'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/export.h:99:20: error: pasting "__kstrtab_" and "(" does not give a valid preprocessing token
99 | extern const char __kstrtab_##sym[]; | ^~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
>> drivers/ata/libata-scsi.c:1024:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~
>> include/linux/stddef.h:8:15: error: expected declaration specifiers or '...' before '(' token
8 | #define NULL ((void *)0)
| ^
include/linux/export.h:99:32: note: in definition of macro '___EXPORT_SYMBOL'
99 | extern const char __kstrtab_##sym[]; | ^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
>> drivers/ata/libata-scsi.c:1024:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~
>> include/linux/libata.h:1098:33: note: in expansion of macro 'NULL'
1098 | #define ata_scsi_dma_need_drain NULL
| ^~~~
drivers/ata/libata-scsi.c:1024:19: note: in expansion of macro 'ata_scsi_dma_need_drain'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/export.h:100:20: error: pasting "__kstrtabns_" and "(" does not give a valid preprocessing token
100 | extern const char __kstrtabns_##sym[]; | ^~~~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
>> drivers/ata/libata-scsi.c:1024:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~
>> include/linux/stddef.h:8:15: error: expected declaration specifiers or '...' before '(' token
8 | #define NULL ((void *)0)
| ^
include/linux/export.h:100:34: note: in definition of macro '___EXPORT_SYMBOL'
100 | extern const char __kstrtabns_##sym[]; | ^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
drivers/ata/libata-scsi.c:1024:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~
include/linux/libata.h:1098:33: note: in expansion of macro 'NULL'
1098 | #define ata_scsi_dma_need_drain NULL
| ^~~~
drivers/ata/libata-scsi.c:1024:19: note: in expansion of macro 'ata_scsi_dma_need_drain'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:67:36: error: pasting "__ksymtab_" and "(" does not give a valid preprocessing token
67 | static const struct kernel_symbol __ksymtab_##sym | ^~~~~~~~~~
include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
drivers/ata/libata-scsi.c:1024:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~
include/linux/stddef.h:8:15: error: expected declaration specifiers or '...' before '(' token
8 | #define NULL ((void *)0)
| ^
include/linux/export.h:67:48: note: in definition of macro '__KSYMTAB_ENTRY'
67 | static const struct kernel_symbol __ksymtab_##sym | ^~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
drivers/ata/libata-scsi.c:1024:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~
include/linux/libata.h:1098:33: note: in expansion of macro 'NULL'
1098 | #define ata_scsi_dma_need_drain NULL
| ^~~~
drivers/ata/libata-scsi.c:1024:19: note: in expansion of macro 'ata_scsi_dma_need_drain'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:70:27: error: pasting "__kstrtab_" and "(" does not give a valid preprocessing token
70 | = { (unsigned long)&sym, __kstrtab_##sym, __kstrtabns_##sym }
| ^~~~~~~~~~
include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
drivers/ata/libata-scsi.c:1024:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~
include/linux/export.h:70:44: error: pasting "__kstrtabns_" and "(" does not give a valid preprocessing token
70 | = { (unsigned long)&sym, __kstrtab_##sym, __kstrtabns_##sym }
| ^~~~~~~~~~~~
include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
drivers/ata/libata-scsi.c:1024:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
1024 | EXPORT_SYMBOL_GPL(ata_scsi_dma_need_drain);
| ^~~~~~~~~~~~~~~~~
vim +99 include/linux/export.h
69a94abb82eed2 Masahiro Yamada 2019-09-09 84
ce2b617ce8cbb7 Jessica Yu 2019-11-12 85 /*
ce2b617ce8cbb7 Jessica Yu 2019-11-12 86 * For every exported symbol, do the following:
ce2b617ce8cbb7 Jessica Yu 2019-11-12 87 *
ce2b617ce8cbb7 Jessica Yu 2019-11-12 88 * - If applicable, place a CRC entry in the __kcrctab section.
ce2b617ce8cbb7 Jessica Yu 2019-11-12 89 * - Put the name of the symbol and namespace (empty string "" for none) in
ce2b617ce8cbb7 Jessica Yu 2019-11-12 90 * __ksymtab_strings.
ce2b617ce8cbb7 Jessica Yu 2019-11-12 91 * - Place a struct kernel_symbol entry in the __ksymtab section.
ce2b617ce8cbb7 Jessica Yu 2019-11-12 92 *
ce2b617ce8cbb7 Jessica Yu 2019-11-12 93 * note on .section use: we specify progbits since usage of the "M" (SHF_MERGE)
ce2b617ce8cbb7 Jessica Yu 2019-11-12 94 * section flag requires it. Use '%progbits' instead of '@progbits' since the
ce2b617ce8cbb7 Jessica Yu 2019-11-12 95 * former apparently works on all arches according to the binutils source.
ce2b617ce8cbb7 Jessica Yu 2019-11-12 96 */
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 97 #define ___EXPORT_SYMBOL(sym, sec, ns) \
f50169324df4ad Paul Gortmaker 2011-05-23 98 extern typeof(sym) sym; \
ce2b617ce8cbb7 Jessica Yu 2019-11-12 @99 extern const char __kstrtab_##sym[]; \
ce2b617ce8cbb7 Jessica Yu 2019-11-12 @100 extern const char __kstrtabns_##sym[]; \
8651ec01daedad Matthias Maennich 2019-09-06 101 __CRC_SYMBOL(sym, sec); \
ce2b617ce8cbb7 Jessica Yu 2019-11-12 102 asm(" .section \"__ksymtab_strings\",\"aMS\",%progbits,1 \n" \
ce2b617ce8cbb7 Jessica Yu 2019-11-12 103 "__kstrtab_" #sym ": \n" \
ce2b617ce8cbb7 Jessica Yu 2019-11-12 104 " .asciz \"" #sym "\" \n" \
ce2b617ce8cbb7 Jessica Yu 2019-11-12 105 "__kstrtabns_" #sym ": \n" \
ce2b617ce8cbb7 Jessica Yu 2019-11-12 106 " .asciz \"" ns "\" \n" \
ce2b617ce8cbb7 Jessica Yu 2019-11-12 107 " .previous \n"); \
7290d58095712a Ard Biesheuvel 2018-08-21 108 __KSYMTAB_ENTRY(sym, sec)
f50169324df4ad Paul Gortmaker 2011-05-23 109
:::::: The code at line 99 was first introduced by commit
:::::: ce2b617ce8cbb7ba7a956299061bbc784131333c export.h: reduce __ksymtab_strings string duplication by using "MS" section flags
:::::: TO: Jessica Yu <jeyu(a)kernel.org>
:::::: CC: Jessica Yu <jeyu(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
ld.lld: error: undefined symbol: ptp_clock_index
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Masahiro Yamada <masahiroy(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b29482fde649c72441d5478a4ea2c52c56d97a5e
commit: def2fbffe62c00c330c7f41584a356001179c59c kconfig: allow symbols implied by y to become m
date: 3 months ago
config: x86_64-randconfig-r003-20200611 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout def2fbffe62c00c330c7f41584a356001179c59c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>, old ones prefixed by <<):
>> ld.lld: error: undefined symbol: ptp_clock_index
>>> referenced by lio_ethtool.c
>>> net/ethernet/cavium/liquidio/lio_ethtool.o:(lio_get_ts_info) in archive drivers/built-in.a
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[jkirsher-next-queue:dev-queue 24/55] drivers/net/ethernet/intel/iecm/iecm_txrx.c:2510:28: error: 'last_offset' undeclared; did you mean
by kernel test robot
Hi Alice,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue
head: 94e8b9f389d896ead02e9633104231fc864da9b0
commit: c819711bc82d7e96631d43f7c7c7a0e11fc8aad0 [24/55] iecm: Add iecm to the kernel build system
config: arc-allyesconfig (attached as .config)
compiler: arc-elf-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
git checkout c819711bc82d7e96631d43f7c7c7a0e11fc8aad0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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 >>, old ones prefixed by <<):
In file included from drivers/net/ethernet/intel/include/iecm.h:44,
from drivers/net/ethernet/intel/iecm/iecm_txrx.c:4:
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:809:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:891:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:891:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_txq_info_v2' is not an integer constant
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:907:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:907:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_tx_queues' is not an integer constant
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:937:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:937:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rxq_info_v2' is not an integer constant
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:952:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:952:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_rx_queues' is not an integer constant
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1090:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:1090:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_hash' is not an integer constant
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
drivers/net/ethernet/intel/iecm/iecm_txrx.c:84:6: warning: no previous prototype for 'iecm_tx_buf_rel_all' [-Wmissing-prototypes]
84 | void iecm_tx_buf_rel_all(struct iecm_queue *txq)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/iecm/iecm_txrx.c:115:6: warning: no previous prototype for 'iecm_tx_desc_rel' [-Wmissing-prototypes]
115 | void iecm_tx_desc_rel(struct iecm_queue *txq, bool bufq)
| ^~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/iecm/iecm_txrx.c:136:6: warning: no previous prototype for 'iecm_tx_desc_rel_all' [-Wmissing-prototypes]
136 | void iecm_tx_desc_rel_all(struct iecm_vport *vport)
| ^~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/iecm/iecm_txrx.c:312:6: warning: no previous prototype for 'iecm_rx_buf_rel_all' [-Wmissing-prototypes]
312 | void iecm_rx_buf_rel_all(struct iecm_queue *rxq)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/iecm/iecm_txrx.c:341:6: warning: no previous prototype for 'iecm_rx_desc_rel' [-Wmissing-prototypes]
341 | void iecm_rx_desc_rel(struct iecm_queue *rxq, bool bufq,
| ^~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/iecm/iecm_txrx.c:371:6: warning: no previous prototype for 'iecm_rx_desc_rel_all' [-Wmissing-prototypes]
371 | void iecm_rx_desc_rel_all(struct iecm_vport *vport)
| ^~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/iecm/iecm_txrx.c:486:6: warning: no previous prototype for 'iecm_rx_hdr_buf_hw_alloc' [-Wmissing-prototypes]
486 | bool iecm_rx_hdr_buf_hw_alloc(struct iecm_queue *rxq,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/iecm/iecm_txrx.c: In function 'iecm_rx_can_reuse_page':
>> drivers/net/ethernet/intel/iecm/iecm_txrx.c:2510:28: error: 'last_offset' undeclared (first use in this function); did you mean 'page_offset'?
2510 | if (rx_buf->page_offset > last_offset)
| ^~~~~~~~~~~
| page_offset
drivers/net/ethernet/intel/iecm/iecm_txrx.c:2510:28: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/ethernet/intel/iecm/iecm_txrx.c: At top level:
drivers/net/ethernet/intel/iecm/iecm_txrx.c:3565:5: warning: no previous prototype for 'iecm_vport_splitq_napi_poll' [-Wmissing-prototypes]
3565 | int iecm_vport_splitq_napi_poll(struct napi_struct *napi, int budget)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/iecm/iecm_txrx.c:3603:6: warning: no previous prototype for 'iecm_vport_intr_map_vector_to_qs' [-Wmissing-prototypes]
3603 | void iecm_vport_intr_map_vector_to_qs(struct iecm_vport *vport)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/iecm/iecm_txrx.c:3715:5: warning: no previous prototype for 'iecm_vport_intr_alloc' [-Wmissing-prototypes]
3715 | int iecm_vport_intr_alloc(struct iecm_vport *vport)
| ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/intel/include/iecm.h:50,
from drivers/net/ethernet/intel/iecm/iecm_txrx.c:4:
drivers/net/ethernet/intel/include/iecm_txrx.h:293:30: warning: 'iecm_rx_ptype_lkup' defined but not used [-Wunused-const-variable=]
293 | struct iecm_rx_ptype_decoded iecm_rx_ptype_lkup[IECM_RX_SUPP_PTYPE] = {
| ^~~~~~~~~~~~~~~~~~
vim +2510 drivers/net/ethernet/intel/iecm/iecm_txrx.c
fdd2252e115282 Alice Michael 2020-05-18 2484
fdd2252e115282 Alice Michael 2020-05-18 2485 /**
fdd2252e115282 Alice Michael 2020-05-18 2486 * iecm_rx_can_reuse_page - Determine if page can be reused for another rx
fdd2252e115282 Alice Michael 2020-05-18 2487 * @rx_buf: buffer containing the page
fdd2252e115282 Alice Michael 2020-05-18 2488 *
fdd2252e115282 Alice Michael 2020-05-18 2489 * If page is reusable, we have a green light for calling iecm_reuse_rx_page,
fdd2252e115282 Alice Michael 2020-05-18 2490 * which will assign the current buffer to the buffer that next_to_alloc is
fdd2252e115282 Alice Michael 2020-05-18 2491 * pointing to; otherwise, the dma mapping needs to be destroyed and
fdd2252e115282 Alice Michael 2020-05-18 2492 * page freed
fdd2252e115282 Alice Michael 2020-05-18 2493 */
fdd2252e115282 Alice Michael 2020-05-18 2494 static bool iecm_rx_can_reuse_page(struct iecm_rx_buf *rx_buf)
fdd2252e115282 Alice Michael 2020-05-18 2495 {
a97bc8562eabd9 Alice Michael 2020-05-18 2496 #if (PAGE_SIZE >= 8192)
a97bc8562eabd9 Alice Michael 2020-05-18 2497 #endif
a97bc8562eabd9 Alice Michael 2020-05-18 2498 unsigned int pagecnt_bias = rx_buf->pagecnt_bias;
a97bc8562eabd9 Alice Michael 2020-05-18 2499 struct page *page = rx_buf->page;
a97bc8562eabd9 Alice Michael 2020-05-18 2500
a97bc8562eabd9 Alice Michael 2020-05-18 2501 /* avoid re-using remote pages */
a97bc8562eabd9 Alice Michael 2020-05-18 2502 if (unlikely(iecm_rx_page_is_reserved(page)))
a97bc8562eabd9 Alice Michael 2020-05-18 2503 return false;
a97bc8562eabd9 Alice Michael 2020-05-18 2504
a97bc8562eabd9 Alice Michael 2020-05-18 2505 #if (PAGE_SIZE < 8192)
a97bc8562eabd9 Alice Michael 2020-05-18 2506 /* if we are only owner of page we can reuse it */
a97bc8562eabd9 Alice Michael 2020-05-18 2507 if (unlikely((page_count(page) - pagecnt_bias) > 1))
a97bc8562eabd9 Alice Michael 2020-05-18 2508 return false;
a97bc8562eabd9 Alice Michael 2020-05-18 2509 #else
a97bc8562eabd9 Alice Michael 2020-05-18 @2510 if (rx_buf->page_offset > last_offset)
a97bc8562eabd9 Alice Michael 2020-05-18 2511 return false;
a97bc8562eabd9 Alice Michael 2020-05-18 2512 #endif /* PAGE_SIZE < 8192) */
a97bc8562eabd9 Alice Michael 2020-05-18 2513
a97bc8562eabd9 Alice Michael 2020-05-18 2514 /* If we have drained the page fragment pool we need to update
a97bc8562eabd9 Alice Michael 2020-05-18 2515 * the pagecnt_bias and page count so that we fully restock the
a97bc8562eabd9 Alice Michael 2020-05-18 2516 * number of references the driver holds.
a97bc8562eabd9 Alice Michael 2020-05-18 2517 */
a97bc8562eabd9 Alice Michael 2020-05-18 2518 if (unlikely(pagecnt_bias == 1)) {
a97bc8562eabd9 Alice Michael 2020-05-18 2519 page_ref_add(page, USHRT_MAX - 1);
a97bc8562eabd9 Alice Michael 2020-05-18 2520 rx_buf->pagecnt_bias = USHRT_MAX;
a97bc8562eabd9 Alice Michael 2020-05-18 2521 }
a97bc8562eabd9 Alice Michael 2020-05-18 2522
a97bc8562eabd9 Alice Michael 2020-05-18 2523 return true;
fdd2252e115282 Alice Michael 2020-05-18 2524 }
fdd2252e115282 Alice Michael 2020-05-18 2525
:::::: The code at line 2510 was first introduced by commit
:::::: a97bc8562eabd967fbf65cf4c21c2118599d8908 iecm: Add splitq TX/RX
:::::: TO: Alice Michael <alice.michael(a)intel.com>
:::::: CC: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/mtd/nand/raw/mxic_nand.c:219:9: sparse: sparse: cast removes address space '<asn:2>' of expression
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b29482fde649c72441d5478a4ea2c52c56d97a5e
commit: 738b0ca55f4f6ae1035262c2a2a605d2e9085031 mtd: rawnand: Add Macronix raw NAND controller driver
date: 10 months ago
config: m68k-randconfig-s031-20200611 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
git checkout 738b0ca55f4f6ae1035262c2a2a605d2e9085031
# save the attached .config to linux build tree
make W=1 C=1 ARCH=m68k CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/mtd/nand/raw/mxic_nand.c:219:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:224:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:288:15: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:299:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:302:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:303:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:304:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:305:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:306:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:307:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:312:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:312:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:314:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:314:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:320:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:320:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:356:23: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:356:23: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:361:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:363:23: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:363:23: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:368:23: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:368:23: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:374:24: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:379:21: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:403:25: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:404:25: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:405:25: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:414:25: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:423:25: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:424:25: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:432:25: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:434:25: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/mtd/nand/raw/mxic_nand.c:473:17: sparse: sparse: cast removes address space '<asn:2>' of expression
vim +219 drivers/mtd/nand/raw/mxic_nand.c
216
217 static void mxic_nfc_set_input_delay(struct mxic_nand_ctlr *nfc, u8 idly_code)
218 {
> 219 writel(IDLY_CODE_VAL(0, idly_code) |
220 IDLY_CODE_VAL(1, idly_code) |
221 IDLY_CODE_VAL(2, idly_code) |
222 IDLY_CODE_VAL(3, idly_code),
223 nfc->regs + IDLY_CODE(0));
224 writel(IDLY_CODE_VAL(4, idly_code) |
225 IDLY_CODE_VAL(5, idly_code) |
226 IDLY_CODE_VAL(6, idly_code) |
227 IDLY_CODE_VAL(7, idly_code),
228 nfc->regs + IDLY_CODE(1));
229 }
230
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[jkirsher-next-queue:dev-queue 11/55] include/linux/avf/virtchnl.h:872:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_vport' is not an integer constant
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue
head: 94e8b9f389d896ead02e9633104231fc864da9b0
commit: 2498cdba2cbf1af8fa4ff479b981e2e2240e2a46 [11/55] virtchnl: Extend AVF ops
config: arm-randconfig-r004-20200611 (attached as .config)
compiler: arm-linux-gnueabi-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
git checkout 2498cdba2cbf1af8fa4ff479b981e2e2240e2a46
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 >>, old ones prefixed by <<):
| ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:299:32: warning: division by zero [-Wdiv-by-zero]
299 | { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:304:34: note: in expansion of macro 'I40E_CHECK_STRUCT_LEN'
304 | #define I40E_CHECK_CMD_LENGTH(X) I40E_CHECK_STRUCT_LEN(16, X)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1775:1: note: in expansion of macro 'I40E_CHECK_CMD_LENGTH'
1775 | I40E_CHECK_CMD_LENGTH(i40e_aqc_get_link_status);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1775:23: error: enumerator value for 'i40e_static_assert_i40e_aqc_get_link_status' is not an integer constant
1775 | I40E_CHECK_CMD_LENGTH(i40e_aqc_get_link_status);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:299:49: note: in definition of macro 'I40E_CHECK_STRUCT_LEN'
299 | { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1775:1: note: in expansion of macro 'I40E_CHECK_CMD_LENGTH'
1775 | I40E_CHECK_CMD_LENGTH(i40e_aqc_get_link_status);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:299:32: warning: division by zero [-Wdiv-by-zero]
299 | { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1914:1: note: in expansion of macro 'I40E_CHECK_STRUCT_LEN'
1914 | I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1914:28: error: enumerator value for 'i40e_static_assert_i40e_aqc_nvm_config_data_feature' is not an integer constant
1914 | I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:299:49: note: in definition of macro 'I40E_CHECK_STRUCT_LEN'
299 | { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
In file included from drivers/net/ethernet/intel/i40e/i40e_prototype.h:9,
from drivers/net/ethernet/intel/i40e/i40e.h:40,
from drivers/net/ethernet/intel/i40e/i40e_main.c:10:
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:403:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
403 | VIRTCHNL_CHECK_STRUCT_LEN(14, virtchnl_irq_map_info);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:403:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_irq_map_info' is not an integer constant
403 | VIRTCHNL_CHECK_STRUCT_LEN(14, virtchnl_irq_map_info);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:469:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
469 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vlan_filter_list);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:469:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_vlan_filter_list' is not an integer constant
469 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vlan_filter_list);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:525:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
525 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:525:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_key' is not an integer constant
525 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);
| ^~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:534:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
534 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:534:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_lut' is not an integer constant
534 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);
| ^~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:809:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:872:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
872 | VIRTCHNL_CHECK_STRUCT_LEN(2, virtchnl_vport);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:872:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_vport' is not an integer constant
872 | VIRTCHNL_CHECK_STRUCT_LEN(2, virtchnl_vport);
| ^~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:891:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:891:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_txq_info_v2' is not an integer constant
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:907:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:907:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_tx_queues' is not an integer constant
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:937:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:937:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rxq_info_v2' is not an integer constant
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:952:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:952:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_rx_queues' is not an integer constant
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1034:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1034 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vector_chunks);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1034:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_vector_chunks' is not an integer constant
1034 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vector_chunks);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1048:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1048 | VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_alloc_vectors);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1048:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_alloc_vectors' is not an integer constant
1048 | VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_alloc_vectors);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1068:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1068 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1068:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_lut_v2' is not an integer constant
1068 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut_v2);
| ^~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1090:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:1090:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_hash' is not an integer constant
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1103:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1103 | VIRTCHNL_CHECK_STRUCT_LEN(2, virtchnl_sriov_vfs_info);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1103:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_sriov_vfs_info' is not an integer constant
1103 | VIRTCHNL_CHECK_STRUCT_LEN(2, virtchnl_sriov_vfs_info);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
--
In file included from drivers/net/ethernet/intel/ice/ice.h:36,
from drivers/net/ethernet/intel/ice/ice_main.c:8:
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:403:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
403 | VIRTCHNL_CHECK_STRUCT_LEN(14, virtchnl_irq_map_info);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:403:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_irq_map_info' is not an integer constant
403 | VIRTCHNL_CHECK_STRUCT_LEN(14, virtchnl_irq_map_info);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:469:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
469 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vlan_filter_list);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:469:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_vlan_filter_list' is not an integer constant
469 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vlan_filter_list);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:525:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
525 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:525:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_key' is not an integer constant
525 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);
| ^~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:534:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
534 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:534:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_lut' is not an integer constant
534 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);
| ^~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:809:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:872:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
872 | VIRTCHNL_CHECK_STRUCT_LEN(2, virtchnl_vport);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:872:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_vport' is not an integer constant
872 | VIRTCHNL_CHECK_STRUCT_LEN(2, virtchnl_vport);
| ^~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:891:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:891:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_txq_info_v2' is not an integer constant
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:907:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:907:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_tx_queues' is not an integer constant
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:937:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:937:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rxq_info_v2' is not an integer constant
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:952:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:952:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_rx_queues' is not an integer constant
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1034:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1034 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vector_chunks);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1034:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_vector_chunks' is not an integer constant
1034 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vector_chunks);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1048:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1048 | VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_alloc_vectors);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1048:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_alloc_vectors' is not an integer constant
1048 | VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_alloc_vectors);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1068:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1068 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1068:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_lut_v2' is not an integer constant
1068 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut_v2);
| ^~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1090:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:1090:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_hash' is not an integer constant
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1103:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1103 | VIRTCHNL_CHECK_STRUCT_LEN(2, virtchnl_sriov_vfs_info);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1103:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_sriov_vfs_info' is not an integer constant
1103 | VIRTCHNL_CHECK_STRUCT_LEN(2, virtchnl_sriov_vfs_info);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
..
vim +/virtchnl_static_assert_virtchnl_vport +872 include/linux/avf/virtchnl.h
871
> 872 VIRTCHNL_CHECK_STRUCT_LEN(2, virtchnl_vport);
873
874 /* Tx queue config info */
875 struct virtchnl_txq_info_v2 {
876 u16 queue_id;
877 /* single or split */
878 enum virtchnl_queue_model model;
879 /* tx or tx_completion */
880 enum virtchnl_queue_type type;
881 /* queue or flow based */
882 enum virtchnl_txq_sched_mode sched_mode;
883 /* base or native */
884 enum virtchnl_desc_profile desc_profile;
885 u16 ring_len;
886 u64 dma_ring_addr;
887 /* valid only if queue model is split and type is tx */
888 u16 tx_compl_queue_id;
889 };
890
891 VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
892
893 /* VIRTCHNL_OP_CONFIG_TX_QUEUES
894 * PF sends this message to set up parameters for one or more TX queues.
895 * This message contains an array of num_qinfo instances of virtchnl_txq_info_v2
896 * structures. CP configures requested queues and returns a status code. If
897 * num_qinfo specified is greater than the number of queues associated with the
898 * vport, an error is returned and no queues are configured.
899 */
900 struct virtchnl_config_tx_queues {
901 u16 vport_id;
902 u16 num_qinfo;
903 u32 rsvd;
904 struct virtchnl_txq_info_v2 qinfo[1];
905 };
906
907 VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
908
909 /* Rx queue config info */
910 struct virtchnl_rxq_info_v2 {
911 u16 queue_id;
912 /* single or split */
913 enum virtchnl_queue_model model;
914 /* rx or rx buffer */
915 enum virtchnl_queue_type type;
916 /* base or native */
917 enum virtchnl_desc_profile desc_profile;
918 /* rsc, header-split, immediate write back */
919 u16 queue_flags;
920 /* 16 or 32 byte */
921 enum virtchnl_rxq_desc_size desc_size;
922 u16 ring_len;
923 u16 hdr_buffer_size;
924 u32 data_buffer_size;
925 u32 max_pkt_size;
926 u64 dma_ring_addr;
927 u64 dma_head_wb_addr;
928 u16 rsc_low_watermark;
929 u8 buffer_notif_stride;
930 enum virtchnl_rx_hsplit rx_split_pos;
931 /* valid only if queue model is split and type is rx buffer*/
932 u16 rx_bufq1_id;
933 /* valid only if queue model is split and type is rx buffer*/
934 u16 rx_bufq2_id;
935 };
936
937 VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
938
939 /* VIRTCHNL_OP_CONFIG_RX_QUEUES
940 * PF sends this message to set up parameters for one or more RX queues.
941 * This message contains an array of num_qinfo instances of virtchnl_rxq_info_v2
942 * structures. CP configures requested queues and returns a status code.
943 * If the number of queues specified is greater than the number of queues
944 * associated with the vport, an error is returned and no queues are configured.
945 */
946 struct virtchnl_config_rx_queues {
947 u16 vport_id;
948 u16 num_qinfo;
949 struct virtchnl_rxq_info_v2 qinfo[1];
950 };
951
952 VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
953
954 /* VIRTCHNL_OP_ADD_QUEUES
955 * PF sends this message to request additional TX/RX queues beyond the ones
956 * that were assigned via CREATE_VPORT request. virtchnl_add_queues structure is
957 * used to specify the number of each type of queues.
958 * CP responds with the same structure with the actual number of queues assigned
959 * followed by num_chunks of virtchnl_queue_chunk structures.
960 */
961 struct virtchnl_add_queues {
962 u16 vport_id;
963 u16 num_tx_q;
964 u16 num_tx_complq;
965 u16 num_rx_q;
966 u16 num_rx_bufq;
967 struct virtchnl_queue_chunks chunks;
968 };
969
970 VIRTCHNL_CHECK_STRUCT_LEN(24, virtchnl_add_queues);
971
972 /* VIRTCHNL_OP_ENABLE_QUEUES
973 * VIRTCHNL_OP_DISABLE_QUEUES
974 * VIRTCHNL_OP_DEL_QUEUES
975 * PF sends these messages to enable, disable or delete queues specified in
976 * chunks. PF sends virtchnl_del_ena_dis_queues struct to specify the queues
977 * to be enabled/disabled/deleted. Also applicable to single queue RX or
978 * TX. CP performs requested action and returns status.
979 */
980 struct virtchnl_del_ena_dis_queues {
981 u16 vport_id;
982 struct virtchnl_queue_chunks chunks;
983 };
984
985 VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_del_ena_dis_queues);
986
987 /* Virtchannel interrupt throttling rate index */
988 enum virtchnl_itr_idx {
989 VIRTCHNL_ITR_IDX_0 = 0,
990 VIRTCHNL_ITR_IDX_1 = 1,
991 VIRTCHNL_ITR_IDX_NO_ITR = 3,
992 };
993
994 /* Queue to vector mapping */
995 struct virtchnl_queue_vector {
996 u16 queue_id;
997 u16 vector_id;
998 enum virtchnl_itr_idx itr_idx;
999 enum virtchnl_queue_type queue_type;
1000 };
1001
1002 VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_queue_vector);
1003
1004 /* VIRTCHNL_OP_MAP_QUEUE_VECTOR
1005 * VIRTCHNL_OP_UNMAP_QUEUE_VECTOR
1006 * PF sends this message to map or unmap queues to vectors and ITR index
1007 * registers. External data buffer contains virtchnl_queue_vector_maps structure
1008 * that contains num_maps of virtchnl_queue_vector structures.
1009 * CP maps the requested queue vector maps after validating the queue and vector
1010 * ids and returns a status code.
1011 */
1012 struct virtchnl_queue_vector_maps {
1013 u16 vport_id;
1014 u16 num_maps;
1015 struct virtchnl_queue_vector qv_maps[1];
1016 };
1017
1018 VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_queue_vector_maps);
1019
1020 /* Structure to specify a chunk of contiguous interrupt vectors */
1021 struct virtchnl_vector_chunk {
1022 u16 start_vector_id;
1023 u16 num_vectors;
1024 };
1025
1026 VIRTCHNL_CHECK_STRUCT_LEN(4, virtchnl_vector_chunk);
1027
1028 /* Structure to specify several chunks of contiguous interrupt vectors */
1029 struct virtchnl_vector_chunks {
1030 u16 num_vector_chunks;
1031 struct virtchnl_vector_chunk num_vchunk[1];
1032 };
1033
> 1034 VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vector_chunks);
1035
1036 /* VIRTCHNL_OP_ALLOC_VECTORS
1037 * PF sends this message to request additional interrupt vectors beyond the
1038 * ones that were assigned via GET_CAPS request. virtchnl_alloc_vectors
1039 * structure is used to specify the number of vectors requested. CP responds
1040 * with the same structure with the actual number of vectors assigned followed
1041 * by virtchnl_vector_chunks structure identifying the vector ids.
1042 */
1043 struct virtchnl_alloc_vectors {
1044 u16 num_vectors;
1045 struct virtchnl_vector_chunks vchunks;
1046 };
1047
> 1048 VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_alloc_vectors);
1049
1050 /* VIRTCHNL_OP_DEALLOC_VECTORS
1051 * PF sends this message to release the vectors.
1052 * PF sends virtchnl_vector_chunks struct to specify the vectors it is giving
1053 * away. CP performs requested action and returns status.
1054 */
1055
1056 /* VIRTCHNL_OP_GET_RSS_LUT
1057 * VIRTCHNL_OP_SET_RSS_LUT
1058 * PF sends this message to get or set RSS lookup table. Only supported if
1059 * both PF and CP drivers set the VIRTCHNL_CAP_RSS bit during configuration
1060 * negotiation. Uses the virtchnl_rss_lut_v2 structure
1061 */
1062 struct virtchnl_rss_lut_v2 {
1063 u16 vport_id;
1064 u16 lut_entries;
1065 u16 lut[1]; /* RSS lookup table */
1066 };
1067
> 1068 VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut_v2);
1069
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[jkirsher-next-queue:dev-queue 11/55] include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue
head: 94e8b9f389d896ead02e9633104231fc864da9b0
commit: 2498cdba2cbf1af8fa4ff479b981e2e2240e2a46 [11/55] virtchnl: Extend AVF ops
config: i386-debian-10.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 2498cdba2cbf1af8fa4ff479b981e2e2240e2a46
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>, old ones prefixed by <<):
In file included from drivers/net/ethernet/intel/i40e/i40e_prototype.h:9,
from drivers/net/ethernet/intel/i40e/i40e.h:40,
from drivers/net/ethernet/intel/i40e/i40e_main.c:10:
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:809:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:891:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:891:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_txq_info_v2' is not an integer constant
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:907:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:907:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_tx_queues' is not an integer constant
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:937:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:937:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rxq_info_v2' is not an integer constant
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:952:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:952:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_rx_queues' is not an integer constant
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1090:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1090:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_hash' is not an integer constant
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
--
In file included from drivers/net/ethernet/intel/ice/ice.h:36,
from drivers/net/ethernet/intel/ice/ice_common.h:7,
from drivers/net/ethernet/intel/ice/ice_flex_pipe.c:4:
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:809:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:891:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:891:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_txq_info_v2' is not an integer constant
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:907:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:907:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_tx_queues' is not an integer constant
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:937:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:937:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rxq_info_v2' is not an integer constant
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:952:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:952:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_rx_queues' is not an integer constant
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1090:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1090:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_hash' is not an integer constant
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
In file included from drivers/net/ethernet/intel/ice/ice_flex_pipe.c:6:
drivers/net/ethernet/intel/ice/ice_flex_pipe.c: In function 'ice_free_flow_profs':
drivers/net/ethernet/intel/ice/ice_flow.h:197:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
197 | #define ICE_FLOW_ENTRY_HNDL(e) ((u64)e)
| ^
drivers/net/ethernet/intel/ice/ice_flex_pipe.c:2922:9: note: in expansion of macro 'ICE_FLOW_ENTRY_HNDL'
2922 | ICE_FLOW_ENTRY_HNDL(e));
| ^~~~~~~~~~~~~~~~~~~
--
In file included from drivers/net/ethernet/intel/ice/ice.h:36,
from drivers/net/ethernet/intel/ice/ice_common.h:7,
from drivers/net/ethernet/intel/ice/ice_flow.c:4:
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:809:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:891:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:891:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_txq_info_v2' is not an integer constant
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:907:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:907:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_tx_queues' is not an integer constant
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:937:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:937:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rxq_info_v2' is not an integer constant
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:952:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:952:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_rx_queues' is not an integer constant
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1090:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1090:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_hash' is not an integer constant
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
In file included from drivers/net/ethernet/intel/ice/ice_flow.c:5:
drivers/net/ethernet/intel/ice/ice_flow.c: In function 'ice_flow_add_entry':
drivers/net/ethernet/intel/ice/ice_flow.h:197:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
197 | #define ICE_FLOW_ENTRY_HNDL(e) ((u64)e)
| ^
drivers/net/ethernet/intel/ice/ice_flow.c:946:13: note: in expansion of macro 'ICE_FLOW_ENTRY_HNDL'
946 | *entry_h = ICE_FLOW_ENTRY_HNDL(e);
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/ice/ice_flow.c: In function 'ice_flow_rem_entry':
drivers/net/ethernet/intel/ice/ice_flow.h:198:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
198 | #define ICE_FLOW_ENTRY_PTR(h) ((struct ice_flow_entry *)(h))
| ^
drivers/net/ethernet/intel/ice/ice_flow.c:974:10: note: in expansion of macro 'ICE_FLOW_ENTRY_PTR'
974 | entry = ICE_FLOW_ENTRY_PTR(entry_h);
| ^~~~~~~~~~~~~~~~~~
--
In file included from drivers/net/ethernet/intel/i40e/i40e_prototype.h:9,
from drivers/net/ethernet/intel/i40e/i40e.h:40,
from drivers/net/ethernet/intel/i40e/i40e_main.c:10:
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:809:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:891:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:891:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_txq_info_v2' is not an integer constant
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:907:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:907:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_tx_queues' is not an integer constant
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:937:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:937:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rxq_info_v2' is not an integer constant
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:952:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:952:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_rx_queues' is not an integer constant
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1090:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1090:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_hash' is not an integer constant
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
In file included from drivers/net/ethernet/intel/i40e/i40e_trace.h:209,
from drivers/net/ethernet/intel/i40e/i40e_main.c:20:
include/trace/define_trace.h:95:42: fatal error: ./i40e_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.
..
vim +/virtchnl_static_assert_virtchnl_get_capabilities +809 include/linux/avf/virtchnl.h
808
> 809 VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
810
811 /* structure to specify a chunk of contiguous queues */
812 struct virtchnl_queue_chunk {
813 enum virtchnl_queue_type type;
814 u16 start_queue_id;
815 u16 num_queues;
816 };
817
818 VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_queue_chunk);
819
820 /* structure to specify several chunks of contiguous queues */
821 struct virtchnl_queue_chunks {
822 u16 num_chunks;
823 u16 rsvd;
824 struct virtchnl_queue_chunk chunks[1];
825 };
826
827 VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_queue_chunks);
828
829 /* VIRTCHNL_OP_CREATE_VPORT
830 * PF sends this message to CP to create a vport by filling in the first 8
831 * fields of virtchnl_create_vport structure (vport type, tx, rx queue models
832 * and desired number of queues and vectors). CP responds with the updated
833 * virtchnl_create_vport structure containing the number of assigned queues,
834 * vectors, vport id, max mtu, default mac addr followed by chunks which in turn
835 * will have an array of num_chunks entries of virtchnl_queue_chunk structures.
836 */
837 struct virtchnl_create_vport {
838 enum virtchnl_vport_type vport_type;
839 /* single or split */
840 enum virtchnl_queue_model txq_model;
841 /* single or split */
842 enum virtchnl_queue_model rxq_model;
843 u16 num_tx_q;
844 /* valid only if txq_model is split Q */
845 u16 num_tx_complq;
846 u16 num_rx_q;
847 /* valid only if rxq_model is split Q */
848 u16 num_rx_bufq;
849 u16 vport_id;
850 u16 max_mtu;
851 u8 default_mac_addr[ETH_ALEN];
852 enum virtchnl_rss_algorithm rss_algorithm;
853 u16 rss_key_size;
854 u16 rss_lut_size;
855 u16 qset_handle;
856 struct virtchnl_queue_chunks chunks;
857 };
858
859 VIRTCHNL_CHECK_STRUCT_LEN(56, virtchnl_create_vport);
860
861 /* VIRTCHNL_OP_DESTROY_VPORT
862 * VIRTCHNL_OP_ENABLE_VPORT
863 * VIRTCHNL_OP_DISABLE_VPORT
864 * PF sends this message to CP to destroy, enable or disable a vport by filling
865 * in the vport_id in virtchnl_vport structure.
866 * CP responds with the status of the requested operation.
867 */
868 struct virtchnl_vport {
869 u16 vport_id;
870 };
871
872 VIRTCHNL_CHECK_STRUCT_LEN(2, virtchnl_vport);
873
874 /* Tx queue config info */
875 struct virtchnl_txq_info_v2 {
876 u16 queue_id;
877 /* single or split */
878 enum virtchnl_queue_model model;
879 /* tx or tx_completion */
880 enum virtchnl_queue_type type;
881 /* queue or flow based */
882 enum virtchnl_txq_sched_mode sched_mode;
883 /* base or native */
884 enum virtchnl_desc_profile desc_profile;
885 u16 ring_len;
886 u64 dma_ring_addr;
887 /* valid only if queue model is split and type is tx */
888 u16 tx_compl_queue_id;
889 };
890
> 891 VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
892
893 /* VIRTCHNL_OP_CONFIG_TX_QUEUES
894 * PF sends this message to set up parameters for one or more TX queues.
895 * This message contains an array of num_qinfo instances of virtchnl_txq_info_v2
896 * structures. CP configures requested queues and returns a status code. If
897 * num_qinfo specified is greater than the number of queues associated with the
898 * vport, an error is returned and no queues are configured.
899 */
900 struct virtchnl_config_tx_queues {
901 u16 vport_id;
902 u16 num_qinfo;
903 u32 rsvd;
904 struct virtchnl_txq_info_v2 qinfo[1];
905 };
906
> 907 VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
908
909 /* Rx queue config info */
910 struct virtchnl_rxq_info_v2 {
911 u16 queue_id;
912 /* single or split */
913 enum virtchnl_queue_model model;
914 /* rx or rx buffer */
915 enum virtchnl_queue_type type;
916 /* base or native */
917 enum virtchnl_desc_profile desc_profile;
918 /* rsc, header-split, immediate write back */
919 u16 queue_flags;
920 /* 16 or 32 byte */
921 enum virtchnl_rxq_desc_size desc_size;
922 u16 ring_len;
923 u16 hdr_buffer_size;
924 u32 data_buffer_size;
925 u32 max_pkt_size;
926 u64 dma_ring_addr;
927 u64 dma_head_wb_addr;
928 u16 rsc_low_watermark;
929 u8 buffer_notif_stride;
930 enum virtchnl_rx_hsplit rx_split_pos;
931 /* valid only if queue model is split and type is rx buffer*/
932 u16 rx_bufq1_id;
933 /* valid only if queue model is split and type is rx buffer*/
934 u16 rx_bufq2_id;
935 };
936
> 937 VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
938
939 /* VIRTCHNL_OP_CONFIG_RX_QUEUES
940 * PF sends this message to set up parameters for one or more RX queues.
941 * This message contains an array of num_qinfo instances of virtchnl_rxq_info_v2
942 * structures. CP configures requested queues and returns a status code.
943 * If the number of queues specified is greater than the number of queues
944 * associated with the vport, an error is returned and no queues are configured.
945 */
946 struct virtchnl_config_rx_queues {
947 u16 vport_id;
948 u16 num_qinfo;
949 struct virtchnl_rxq_info_v2 qinfo[1];
950 };
951
> 952 VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
953
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/atm/fore200e.c:447:12: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b29482fde649c72441d5478a4ea2c52c56d97a5e
commit: 05933aac7b11911955de307a329dc2a7a14b7bd0 ia64: remove now unused machvec indirections
date: 10 months ago
config: ia64-randconfig-s032-20200611 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
git checkout 05933aac7b11911955de307a329dc2a7a14b7bd0
# save the attached .config to linux build tree
make W=1 C=1 ARCH=ia64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
./arch/ia64/include/generated/uapi/asm/unistd_64.h:348:39: sparse: sparse: no newline at end of file
drivers/atm/fore200e.c:439:12: sparse: sparse: cast to restricted __le32
>> drivers/atm/fore200e.c:447:12: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
>> drivers/atm/fore200e.c:447:12: sparse: expected unsigned int [usertype] value
drivers/atm/fore200e.c:447:12: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
vim +447 drivers/atm/fore200e.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 434
^1da177e4c3f41 Linus Torvalds 2005-04-16 435 static u32 fore200e_pca_read(volatile u32 __iomem *addr)
^1da177e4c3f41 Linus Torvalds 2005-04-16 436 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 437 /* on big-endian hosts, the board is configured to convert
^1da177e4c3f41 Linus Torvalds 2005-04-16 438 the endianess of slave RAM accesses */
^1da177e4c3f41 Linus Torvalds 2005-04-16 @439 return le32_to_cpu(readl(addr));
^1da177e4c3f41 Linus Torvalds 2005-04-16 440 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 441
^1da177e4c3f41 Linus Torvalds 2005-04-16 442
^1da177e4c3f41 Linus Torvalds 2005-04-16 443 static void fore200e_pca_write(u32 val, volatile u32 __iomem *addr)
^1da177e4c3f41 Linus Torvalds 2005-04-16 444 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 445 /* on big-endian hosts, the board is configured to convert
^1da177e4c3f41 Linus Torvalds 2005-04-16 446 the endianess of slave RAM accesses */
^1da177e4c3f41 Linus Torvalds 2005-04-16 @447 writel(cpu_to_le32(val), addr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 448 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 449
:::::: The code at line 447 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
2 years, 3 months