Re: [PATCH V4 net-next 5/5] icmp: add response to RFC 8335 PROBE messages
by kernel test robot
Hi Andreas,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Andreas-Roeseler/add-support-for...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 6f1629093399303bf19d6fcd5144061d1e25ec23
config: x86_64-randconfig-m001-20210314 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
net/ipv4/icmp.c:1040 icmp_echo() warn: signedness bug returning '(-12)'
vim +1040 net/ipv4/icmp.c
976
977 /*
978 * Handle ICMP_ECHO ("ping") and ICMP_EXT_ECHO ("PROBE") requests.
979 *
980 * RFC 1122: 3.2.2.6 MUST have an echo server that answers ICMP echo
981 * requests.
982 * RFC 1122: 3.2.2.6 Data received in the ICMP_ECHO request MUST be
983 * included in the reply.
984 * RFC 1812: 4.3.3.6 SHOULD have a config option for silently ignoring
985 * echo requests, MUST have default=NOT.
986 * RFC 8335: 8 MUST have a config option to enable/disable ICMP
987 * Extended Echo Functionality, MUST be disabled by default
988 * See also WRT handling of options once they are done and working.
989 */
990
991 static bool icmp_echo(struct sk_buff *skb)
992 {
993 struct icmp_ext_hdr *ext_hdr, _ext_hdr;
994 struct icmp_ext_echo_iio *iio, _iio;
995 struct icmp_bxm icmp_param;
996 struct net_device *dev;
997 struct net *net;
998 u16 ident_len;
999 char *buff;
1000 u8 status;
1001
1002 net = dev_net(skb_dst(skb)->dev);
1003 /* should there be an ICMP stat for ignored echos? */
1004 if (net->ipv4.sysctl_icmp_echo_ignore_all)
1005 return true;
1006
1007 icmp_param.data.icmph = *icmp_hdr(skb);
1008 icmp_param.skb = skb;
1009 icmp_param.offset = 0;
1010 icmp_param.data_len = skb->len;
1011 icmp_param.head_len = sizeof(struct icmphdr);
1012
1013 if (icmp_param.data.icmph.type == ICMP_ECHO)
1014 goto send_reply;
1015 if (!net->ipv4.sysctl_icmp_echo_enable_probe)
1016 return true;
1017 /* We currently only support probing interfaces on the proxy node
1018 * Check to ensure L-bit is set
1019 */
1020 if (!(ntohs(icmp_param.data.icmph.un.echo.sequence) & 1))
1021 return true;
1022 /* Clear status bits in reply message */
1023 icmp_param.data.icmph.un.echo.sequence &= htons(0xFF00);
1024 icmp_param.data.icmph.type = ICMP_EXT_ECHOREPLY;
1025 ext_hdr = skb_header_pointer(skb, 0, sizeof(_ext_hdr), &_ext_hdr);
1026 iio = skb_header_pointer(skb, sizeof(_ext_hdr), sizeof(_iio), &_iio);
1027 if (!ext_hdr || !iio)
1028 goto send_mal_query;
1029 if (ntohs(iio->extobj_hdr.length) <= sizeof(iio->extobj_hdr))
1030 goto send_mal_query;
1031 ident_len = ntohs(iio->extobj_hdr.length) - sizeof(iio->extobj_hdr);
1032 status = 0;
1033 dev = NULL;
1034 switch (iio->extobj_hdr.class_type) {
1035 case EXT_ECHO_CTYPE_NAME:
1036 if (ident_len >= IFNAMSIZ)
1037 goto send_mal_query;
1038 buff = kcalloc(IFNAMSIZ, sizeof(char), GFP_KERNEL);
1039 if (!buff)
> 1040 return -ENOMEM;
1041 memcpy(buff, &iio->ident.name, ident_len);
1042 /* RFC 8335 2.1 If the Object Payload would not otherwise terminate
1043 * on a 32-bit boundary, it MUST be padded with ASCII NULL characters
1044 */
1045 if (ident_len % sizeof(u32) != 0) {
1046 u8 i;
1047
1048 for (i = ident_len; i % sizeof(u32) != 0; i++) {
1049 if (buff[i] != '\0')
1050 goto send_mal_query;
1051 }
1052 }
1053 dev = dev_get_by_name(net, buff);
1054 kfree(buff);
1055 break;
1056 case EXT_ECHO_CTYPE_INDEX:
1057 if (ident_len != sizeof(iio->ident.ifindex))
1058 goto send_mal_query;
1059 dev = dev_get_by_index(net, ntohl(iio->ident.ifindex));
1060 break;
1061 case EXT_ECHO_CTYPE_ADDR:
1062 if (ident_len != sizeof(iio->ident.addr.ctype3_hdr) + iio->ident.addr.ctype3_hdr.addrlen)
1063 goto send_mal_query;
1064 switch (ntohs(iio->ident.addr.ctype3_hdr.afi)) {
1065 case ICMP_AFI_IP:
1066 if (ident_len != sizeof(iio->ident.addr.ctype3_hdr) + sizeof(struct in_addr))
1067 goto send_mal_query;
1068 dev = ip_dev_find(net, iio->ident.addr.ip_addr.ipv4_addr.s_addr);
1069 break;
1070 #if IS_ENABLED(CONFIG_IPV6)
1071 case ICMP_AFI_IP6:
1072 if (ident_len != sizeof(iio->ident.addr.ctype3_hdr) + sizeof(struct in6_addr))
1073 goto send_mal_query;
1074 rcu_read_lock();
1075 dev = ipv6_dev_find(net, &iio->ident.addr.ip_addr.ipv6_addr, dev);
1076 if (dev)
1077 dev_hold(dev);
1078 rcu_read_unlock();
1079 break;
1080 #endif
1081 default:
1082 goto send_mal_query;
1083 }
1084 break;
1085 default:
1086 goto send_mal_query;
1087 }
1088 if (!dev) {
1089 icmp_param.data.icmph.code = ICMP_EXT_NO_IF;
1090 goto send_reply;
1091 }
1092 /* Fill bits in reply message */
1093 if (dev->flags & IFF_UP)
1094 status |= EXT_ECHOREPLY_ACTIVE;
1095 if (__in_dev_get_rcu(dev) && __in_dev_get_rcu(dev)->ifa_list)
1096 status |= EXT_ECHOREPLY_IPV4;
1097 if (!list_empty(&dev->ip6_ptr->addr_list))
1098 status |= EXT_ECHOREPLY_IPV6;
1099 dev_put(dev);
1100 icmp_param.data.icmph.un.echo.sequence |= htons(status);
1101 send_reply:
1102 icmp_reply(&icmp_param, skb);
1103 return true;
1104 send_mal_query:
1105 icmp_param.data.icmph.code = ICMP_EXT_MAL_QUERY;
1106 goto send_reply;
1107 }
1108
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[linux-next:master 2159/4141] drivers/scsi/lpfc/lpfc_sli.c:20815:1: sparse: sparse: context imbalance in '_lpfc_move_xri_pbl_to_pvt' - wrong count at exit
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d98f554b318f57ded14684c04b3337a1975cf490
commit: 960984d964a9341cf50bf2b4ffdf0beb14467517 [2159/4141] include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*()
config: arm-randconfig-s032-20210314 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 960984d964a9341cf50bf2b4ffdf0beb14467517
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
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/scsi/lpfc/lpfc_sli.c:8655:33: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:8701:41: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9589:38: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9597:37: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9598:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sge_len @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:9598:38: sparse: expected unsigned int [usertype] sge_len
drivers/scsi/lpfc/lpfc_sli.c:9598:38: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:9615:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] word2 @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:9615:36: sparse: expected unsigned int [usertype] word2
drivers/scsi/lpfc/lpfc_sli.c:9615:36: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:9624:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addr_hi @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:9624:38: sparse: expected unsigned int [usertype] addr_hi
drivers/scsi/lpfc/lpfc_sli.c:9624:38: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:9626:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addr_lo @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:9626:38: sparse: expected unsigned int [usertype] addr_lo
drivers/scsi/lpfc/lpfc_sli.c:9626:38: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:9628:38: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9630:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] word2 @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:9630:36: sparse: expected unsigned int [usertype] word2
drivers/scsi/lpfc/lpfc_sli.c:9630:36: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:9631:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sge_len @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:9631:38: sparse: expected unsigned int [usertype] sge_len
drivers/scsi/lpfc/lpfc_sli.c:9631:38: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:9701:46: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9702:45: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9706:43: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9710:38: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:10022:37: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:11354:25: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:11382:25: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:13369:37: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:13381:45: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:14050:16: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:17154:57: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg0_addr_lo @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17154:57: sparse: expected unsigned int [usertype] sgl_pg0_addr_lo
drivers/scsi/lpfc/lpfc_sli.c:17154:57: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17156:57: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg0_addr_hi @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17156:57: sparse: expected unsigned int [usertype] sgl_pg0_addr_hi
drivers/scsi/lpfc/lpfc_sli.c:17156:57: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17159:57: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg1_addr_lo @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17159:57: sparse: expected unsigned int [usertype] sgl_pg1_addr_lo
drivers/scsi/lpfc/lpfc_sli.c:17159:57: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17161:57: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg1_addr_hi @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17161:57: sparse: expected unsigned int [usertype] sgl_pg1_addr_hi
drivers/scsi/lpfc/lpfc_sli.c:17161:57: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17450:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg0_addr_lo @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17450:47: sparse: expected unsigned int [usertype] sgl_pg0_addr_lo
drivers/scsi/lpfc/lpfc_sli.c:17450:47: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17452:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg0_addr_hi @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17452:47: sparse: expected unsigned int [usertype] sgl_pg0_addr_hi
drivers/scsi/lpfc/lpfc_sli.c:17452:47: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17459:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg1_addr_lo @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17459:47: sparse: expected unsigned int [usertype] sgl_pg1_addr_lo
drivers/scsi/lpfc/lpfc_sli.c:17459:47: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17461:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg1_addr_hi @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17461:47: sparse: expected unsigned int [usertype] sgl_pg1_addr_hi
drivers/scsi/lpfc/lpfc_sli.c:17461:47: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17472:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] word0 @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17472:20: sparse: expected unsigned int [usertype] word0
drivers/scsi/lpfc/lpfc_sli.c:17472:20: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:18311:16: sparse: sparse: restricted __be16 degrades to integer
drivers/scsi/lpfc/lpfc_sli.c:20004:45: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20004:45: sparse: expected unsigned int
drivers/scsi/lpfc/lpfc_sli.c:20004:45: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:20370:38: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:20378:37: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:20379:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sge_len @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20379:38: sparse: expected unsigned int [usertype] sge_len
drivers/scsi/lpfc/lpfc_sli.c:20379:38: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:20413:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] word2 @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20413:36: sparse: expected unsigned int [usertype] word2
drivers/scsi/lpfc/lpfc_sli.c:20413:36: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:20422:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addr_hi @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20422:30: sparse: expected unsigned int [usertype] addr_hi
drivers/scsi/lpfc/lpfc_sli.c:20422:30: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:20423:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addr_lo @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20423:30: sparse: expected unsigned int [usertype] addr_lo
drivers/scsi/lpfc/lpfc_sli.c:20423:30: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:20424:30: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:20426:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] word2 @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20426:28: sparse: expected unsigned int [usertype] word2
drivers/scsi/lpfc/lpfc_sli.c:20426:28: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:20427:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sge_len @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20427:30: sparse: expected unsigned int [usertype] sge_len
drivers/scsi/lpfc/lpfc_sli.c:20427:30: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:12078:36: sparse: sparse: context imbalance in 'lpfc_sli_abort_taskmgmt' - different lock contexts for basic block
>> drivers/scsi/lpfc/lpfc_sli.c:20815:1: sparse: sparse: context imbalance in '_lpfc_move_xri_pbl_to_pvt' - wrong count at exit
vim +/_lpfc_move_xri_pbl_to_pvt +20815 drivers/scsi/lpfc/lpfc_sli.c
c490850a094794 James Smart 2019-01-28 20796
c490850a094794 James Smart 2019-01-28 20797 /**
c490850a094794 James Smart 2019-01-28 20798 * _lpfc_move_xri_pbl_to_pvt - Move some XRIs from public to private pool
c490850a094794 James Smart 2019-01-28 20799 * @phba: pointer to lpfc hba data structure
7af29d455362ea Lee Jones 2020-07-21 20800 * @qp: pointer to HDW queue
c490850a094794 James Smart 2019-01-28 20801 * @pbl_pool: specified public free XRI pool
c490850a094794 James Smart 2019-01-28 20802 * @pvt_pool: specified private free XRI pool
c490850a094794 James Smart 2019-01-28 20803 * @count: number of XRIs to move
c490850a094794 James Smart 2019-01-28 20804 *
c490850a094794 James Smart 2019-01-28 20805 * This routine tries to move some free common bufs from the specified pbl_pool
c490850a094794 James Smart 2019-01-28 20806 * to the specified pvt_pool. It might move less than count XRIs if there's not
c490850a094794 James Smart 2019-01-28 20807 * enough in public pool.
c490850a094794 James Smart 2019-01-28 20808 *
c490850a094794 James Smart 2019-01-28 20809 * Return:
c490850a094794 James Smart 2019-01-28 20810 * true - if XRIs are successfully moved from the specified pbl_pool to the
c490850a094794 James Smart 2019-01-28 20811 * specified pvt_pool
c490850a094794 James Smart 2019-01-28 20812 * false - if the specified pbl_pool is empty or locked by someone else
c490850a094794 James Smart 2019-01-28 20813 **/
c490850a094794 James Smart 2019-01-28 20814 static bool
6a828b0f6192b4 James Smart 2019-01-28 @20815 _lpfc_move_xri_pbl_to_pvt(struct lpfc_hba *phba, struct lpfc_sli4_hdw_queue *qp,
6a828b0f6192b4 James Smart 2019-01-28 20816 struct lpfc_pbl_pool *pbl_pool,
c490850a094794 James Smart 2019-01-28 20817 struct lpfc_pvt_pool *pvt_pool, u32 count)
c490850a094794 James Smart 2019-01-28 20818 {
c490850a094794 James Smart 2019-01-28 20819 struct lpfc_io_buf *lpfc_ncmd;
c490850a094794 James Smart 2019-01-28 20820 struct lpfc_io_buf *lpfc_ncmd_next;
c490850a094794 James Smart 2019-01-28 20821 unsigned long iflag;
c490850a094794 James Smart 2019-01-28 20822 int ret;
c490850a094794 James Smart 2019-01-28 20823
c490850a094794 James Smart 2019-01-28 20824 ret = spin_trylock_irqsave(&pbl_pool->lock, iflag);
c490850a094794 James Smart 2019-01-28 20825 if (ret) {
c490850a094794 James Smart 2019-01-28 20826 if (pbl_pool->count) {
c490850a094794 James Smart 2019-01-28 20827 /* Move a batch of XRIs from public to private pool */
6a828b0f6192b4 James Smart 2019-01-28 20828 lpfc_qp_spin_lock(&pvt_pool->lock, qp, mv_to_pvt_pool);
c490850a094794 James Smart 2019-01-28 20829 list_for_each_entry_safe(lpfc_ncmd,
c490850a094794 James Smart 2019-01-28 20830 lpfc_ncmd_next,
c490850a094794 James Smart 2019-01-28 20831 &pbl_pool->list,
c490850a094794 James Smart 2019-01-28 20832 list) {
c490850a094794 James Smart 2019-01-28 20833 list_move_tail(&lpfc_ncmd->list,
c490850a094794 James Smart 2019-01-28 20834 &pvt_pool->list);
c490850a094794 James Smart 2019-01-28 20835 pvt_pool->count++;
c490850a094794 James Smart 2019-01-28 20836 pbl_pool->count--;
c490850a094794 James Smart 2019-01-28 20837 count--;
c490850a094794 James Smart 2019-01-28 20838 if (count == 0)
c490850a094794 James Smart 2019-01-28 20839 break;
c490850a094794 James Smart 2019-01-28 20840 }
c490850a094794 James Smart 2019-01-28 20841
c490850a094794 James Smart 2019-01-28 20842 spin_unlock(&pvt_pool->lock);
c490850a094794 James Smart 2019-01-28 20843 spin_unlock_irqrestore(&pbl_pool->lock, iflag);
c490850a094794 James Smart 2019-01-28 20844 return true;
c490850a094794 James Smart 2019-01-28 20845 }
c490850a094794 James Smart 2019-01-28 20846 spin_unlock_irqrestore(&pbl_pool->lock, iflag);
c490850a094794 James Smart 2019-01-28 20847 }
c490850a094794 James Smart 2019-01-28 20848
c490850a094794 James Smart 2019-01-28 20849 return false;
c490850a094794 James Smart 2019-01-28 20850 }
c490850a094794 James Smart 2019-01-28 20851
:::::: The code at line 20815 was first introduced by commit
:::::: 6a828b0f6192b4930894925d1c1d0dc1f1d99e6e scsi: lpfc: Support non-uniform allocation of MSIX vectors to hardware queues
:::::: TO: James Smart <jsmart2021(a)gmail.com>
:::::: CC: Martin K. Petersen <martin.petersen(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[hare-scsi-devel:megaraid.v3 2/4] drivers/scsi/megaraid/megaraid_mbox.c:759:24: error: implicit declaration of function 'ioremap_nocache'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git megaraid.v3
head: 9369ca8fe8c5e0b78306ef343c6c1e1eaec77956
commit: 9187b657e2257f892f70f96ae1e79e3d64a2e712 [2/4] megaraid_mbox: add ioport support
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commi...
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel megaraid.v3
git checkout 9187b657e2257f892f70f96ae1e79e3d64a2e712
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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 >>):
drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_probe_one':
drivers/scsi/megaraid/megaraid_mbox.c:447:30: error: 'PCI_CONF_AMISIG' undeclared (first use in this function); did you mean 'PCI_CONF_AMISIG64'?
447 | pci_read_config_word(pdev, PCI_CONF_AMISIG, &magic);
| ^~~~~~~~~~~~~~~
| PCI_CONF_AMISIG64
drivers/scsi/megaraid/megaraid_mbox.c:447:30: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/megaraid/megaraid_mbox.c:448:16: error: 'HBA_SIGNATURE_471' undeclared (first use in this function); did you mean 'HBA_SIGNATURE_64_BIT'?
448 | if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
| ^~~~~~~~~~~~~~~~~
| HBA_SIGNATURE_64_BIT
drivers/scsi/megaraid/megaraid_mbox.c:448:46: error: 'HBA_SIGNATURE' undeclared (first use in this function)
448 | if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
| ^~~~~~~~~~~~~
drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_init_mbox':
>> drivers/scsi/megaraid/megaraid_mbox.c:759:24: error: implicit declaration of function 'ioremap_nocache'; did you mean 'ioremap_cache'? [-Werror=implicit-function-declaration]
759 | raid_dev->baseaddr = ioremap_nocache(raid_dev->baseport, 128);
| ^~~~~~~~~~~~~~~
| ioremap_cache
>> drivers/scsi/megaraid/megaraid_mbox.c:759:22: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
759 | raid_dev->baseaddr = ioremap_nocache(raid_dev->baseport, 128);
| ^
In file included from drivers/scsi/megaraid/megaraid_mbox.c:70:
drivers/scsi/megaraid/megaraid_mbox.c: In function 'mbox_post_cmd':
>> drivers/scsi/megaraid/megaraid_mbox.h:265:36: error: 'adapter_t' {aka 'struct <anonymous>'} has no member named 'baseport'
265 | outb_p(ENABLE_INTR_BYTE, (adapter)->baseport + TOGGLE_PORT)
| ^~
drivers/scsi/megaraid/megaraid_mbox.c:1455:3: note: in expansion of macro 'irq_enable'
1455 | irq_enable(adapter);
| ^~~~~~~~~~
drivers/scsi/megaraid/megaraid_mbox.h:254:31: error: 'adapter_t' {aka 'struct <anonymous>'} has no member named 'baseport'
254 | outb_p(ISSUE_BYTE, (adapter)->baseport + CMD_PORT)
| ^~
drivers/scsi/megaraid/megaraid_mbox.c:1456:3: note: in expansion of macro 'issue_command'
1456 | issue_command(adapter);
| ^~~~~~~~~~~~~
drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_ack_sequence':
>> drivers/scsi/megaraid/megaraid_mbox.c:2102:4: error: 'byte' undeclared (first use in this function)
2102 | byte = irq_state(adapter);
| ^~~~
In file included from drivers/scsi/megaraid/megaraid_mbox.c:70:
drivers/scsi/megaraid/megaraid_mbox.h:256:43: error: 'adapter_t' {aka 'struct <anonymous>'} has no member named 'baseport'
256 | #define irq_state(adapter) inb_p((adapter)->baseport + INTR_PORT)
| ^~
drivers/scsi/megaraid/megaraid_mbox.c:2102:11: note: in expansion of macro 'irq_state'
2102 | byte = irq_state(adapter);
| ^~~~~~~~~
drivers/scsi/megaraid/megaraid_mbox.h:259:28: error: 'adapter_t' {aka 'struct <anonymous>'} has no member named 'baseport'
259 | outb_p((value), (adapter)->baseport + INTR_PORT)
| ^~
drivers/scsi/megaraid/megaraid_mbox.c:2106:4: note: in expansion of macro 'set_irq_state'
2106 | set_irq_state(adapter, byte);
| ^~~~~~~~~~~~~
drivers/scsi/megaraid/megaraid_mbox.h:262:29: error: 'adapter_t' {aka 'struct <anonymous>'} has no member named 'baseport'
262 | outb_p(ACK_BYTE, (adapter)->baseport + ACK_PORT)
| ^~
drivers/scsi/megaraid/megaraid_mbox.c:2159:4: note: in expansion of macro 'irq_ack'
2159 | irq_ack(adapter);
| ^~~~~~~
drivers/scsi/megaraid/megaraid_mbox.c: In function 'mbox_post_sync_cmd':
drivers/scsi/megaraid/megaraid_mbox.h:268:37: error: 'adapter_t' {aka 'struct <anonymous>'} has no member named 'baseport'
268 | outb_p(DISABLE_INTR_BYTE, (adapter)->baseport + TOGGLE_PORT)
| ^~
drivers/scsi/megaraid/megaraid_mbox.c:2739:3: note: in expansion of macro 'irq_disable'
2739 | irq_disable(adapter);
| ^~~~~~~~~~~
drivers/scsi/megaraid/megaraid_mbox.h:254:31: error: 'adapter_t' {aka 'struct <anonymous>'} has no member named 'baseport'
254 | outb_p(ISSUE_BYTE, (adapter)->baseport + CMD_PORT)
| ^~
drivers/scsi/megaraid/megaraid_mbox.c:2740:3: note: in expansion of macro 'issue_command'
2740 | issue_command(adapter);
| ^~~~~~~~~~~~~
drivers/scsi/megaraid/megaraid_mbox.c:2742:13: error: 'byte' undeclared (first use in this function)
2742 | while (!((byte = irq_state(adapter)) & INTR_VALID))
| ^~~~
In file included from drivers/scsi/megaraid/megaraid_mbox.c:70:
drivers/scsi/megaraid/megaraid_mbox.h:256:43: error: 'adapter_t' {aka 'struct <anonymous>'} has no member named 'baseport'
256 | #define irq_state(adapter) inb_p((adapter)->baseport + INTR_PORT)
| ^~
drivers/scsi/megaraid/megaraid_mbox.c:2742:20: note: in expansion of macro 'irq_state'
2742 | while (!((byte = irq_state(adapter)) & INTR_VALID))
| ^~~~~~~~~
>> drivers/scsi/megaraid/megaraid_mbox.c:2742:42: error: 'INTR_VALID' undeclared (first use in this function)
2742 | while (!((byte = irq_state(adapter)) & INTR_VALID))
| ^~~~~~~~~~
In file included from drivers/scsi/megaraid/megaraid_mbox.c:70:
drivers/scsi/megaraid/megaraid_mbox.h:259:28: error: 'adapter_t' {aka 'struct <anonymous>'} has no member named 'baseport'
259 | outb_p((value), (adapter)->baseport + INTR_PORT)
| ^~
drivers/scsi/megaraid/megaraid_mbox.c:2745:3: note: in expansion of macro 'set_irq_state'
2745 | set_irq_state(adapter, byte);
| ^~~~~~~~~~~~~
>> drivers/scsi/megaraid/megaraid_mbox.h:265:36: error: 'adapter_t' {aka 'struct <anonymous>'} has no member named 'baseport'
265 | outb_p(ENABLE_INTR_BYTE, (adapter)->baseport + TOGGLE_PORT)
| ^~
drivers/scsi/megaraid/megaraid_mbox.c:2746:3: note: in expansion of macro 'irq_enable'
2746 | irq_enable(adapter);
| ^~~~~~~~~~
drivers/scsi/megaraid/megaraid_mbox.h:262:29: error: 'adapter_t' {aka 'struct <anonymous>'} has no member named 'baseport'
262 | outb_p(ACK_BYTE, (adapter)->baseport + ACK_PORT)
| ^~
drivers/scsi/megaraid/megaraid_mbox.c:2747:3: note: in expansion of macro 'irq_ack'
2747 | irq_ack(adapter);
| ^~~~~~~
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
Selected by
- FAULT_INJECTION_STACKTRACE_FILTER && FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT && !X86_64 && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
vim +759 drivers/scsi/megaraid/megaraid_mbox.c
703
704
705 /*
706 * START: Mailbox Low Level Driver
707 *
708 * This is section specific to the single mailbox based controllers
709 */
710
711 /**
712 * megaraid_init_mbox - initialize controller
713 * @adapter : our soft state
714 *
715 * - Allocate 16-byte aligned mailbox memory for firmware handshake
716 * - Allocate controller's memory resources
717 * - Find out all initialization data
718 * - Allocate memory required for all the commands
719 * - Use internal library of FW routines, build up complete soft state
720 */
721 static int
722 megaraid_init_mbox(adapter_t *adapter)
723 {
724 struct pci_dev *pdev;
725 mraid_device_t *raid_dev;
726 int i;
727 uint32_t magic64;
728
729
730 adapter->ito = MBOX_TIMEOUT;
731 pdev = adapter->pdev;
732
733 /*
734 * Allocate and initialize the init data structure for mailbox
735 * controllers
736 */
737 raid_dev = kzalloc(sizeof(mraid_device_t), GFP_KERNEL);
738 if (raid_dev == NULL) return -1;
739
740
741 /*
742 * Attach the adapter soft state to raid device soft state
743 */
744 adapter->raid_device = (caddr_t)raid_dev;
745 raid_dev->fast_load = megaraid_fast_load;
746
747
748 // our baseport
749 raid_dev->baseport = pci_resource_start(pdev, 0);
750
751 if (pci_request_regions(pdev, "MegaRAID: LSI Logic Corporation") != 0) {
752
753 con_log(CL_ANN, (KERN_WARNING
754 "megaraid: mem region busy\n"));
755
756 goto out_free_raid_dev;
757 }
758 if (pci_resource_flags(pdev, 0) & IORESOURCE_MEM) {
> 759 raid_dev->baseaddr = ioremap_nocache(raid_dev->baseport, 128);
760
761 if (!raid_dev->baseaddr) {
762 con_log(CL_ANN, (KERN_WARNING
763 "megaraid: could not map hba memory\n") );
764
765 goto out_release_regions;
766 }
767 } else {
768 raid_dev->baseport += 0x10;
769 raid_dev->baseaddr = NULL;
770 }
771 /* initialize the mutual exclusion lock for the mailbox */
772 spin_lock_init(&raid_dev->mailbox_lock);
773
774 /* allocate memory required for commands */
775 if (megaraid_alloc_cmd_packets(adapter) != 0)
776 goto out_iounmap;
777
778 /*
779 * Issue SYNC cmd to flush the pending cmds in the adapter
780 * and initialize its internal state
781 */
782
783 if (raid_dev->baseaddr)
784 if (megaraid_mbox_fire_sync_cmd(adapter))
785 con_log(CL_ANN, ("megaraid: sync cmd failed\n"));
786
787 /*
788 * Setup the rest of the soft state using the library of
789 * FW routines
790 */
791
792 /* request IRQ and register the interrupt service routine */
793 if (request_irq(adapter->irq, megaraid_isr, IRQF_SHARED, "megaraid",
794 adapter)) {
795
796 con_log(CL_ANN, (KERN_WARNING
797 "megaraid: Couldn't register IRQ %d!\n", adapter->irq));
798 goto out_alloc_cmds;
799
800 }
801
802 // Product info
803 if (megaraid_mbox_product_info(adapter) != 0)
804 goto out_free_irq;
805
806 // Do we support extended CDBs
807 adapter->max_cdb_sz = 10;
808 if (megaraid_mbox_extended_cdb(adapter) == 0) {
809 adapter->max_cdb_sz = 16;
810 }
811
812 /*
813 * Do we support cluster environment, if we do, what is the initiator
814 * id.
815 * NOTE: In a non-cluster aware firmware environment, the LLD should
816 * return 7 as initiator id.
817 */
818 adapter->ha = 0;
819 adapter->init_id = -1;
820 if (megaraid_mbox_support_ha(adapter, &adapter->init_id) == 0) {
821 adapter->ha = 1;
822 }
823
824 /*
825 * Prepare the device ids array to have the mapping between the kernel
826 * device address and megaraid device address.
827 * We export the physical devices on their actual addresses. The
828 * logical drives are exported on a virtual SCSI channel
829 */
830 megaraid_mbox_setup_device_map(adapter);
831
832 // If the firmware supports random deletion, update the device id map
833 if (megaraid_mbox_support_random_del(adapter)) {
834
835 // Change the logical drives numbers in device_ids array one
836 // slot in device_ids is reserved for target id, that's why
837 // "<=" below
838 for (i = 0; i <= MAX_LOGICAL_DRIVES_40LD; i++) {
839 adapter->device_ids[adapter->max_channel][i] += 0x80;
840 }
841 adapter->device_ids[adapter->max_channel][adapter->init_id] =
842 0xFF;
843
844 raid_dev->random_del_supported = 1;
845 }
846
847 /*
848 * find out the maximum number of scatter-gather elements supported by
849 * this firmware
850 */
851 adapter->sglen = megaraid_mbox_get_max_sg(adapter);
852
853 // enumerate RAID and SCSI channels so that all devices on SCSI
854 // channels can later be exported, including disk devices
855 megaraid_mbox_enum_raid_scsi(adapter);
856
857 /*
858 * Other parameters required by upper layer
859 *
860 * maximum number of sectors per IO command
861 */
862 adapter->max_sectors = megaraid_max_sectors;
863
864 /*
865 * number of queued commands per LUN.
866 */
867 adapter->cmd_per_lun = megaraid_cmd_per_lun;
868
869 /*
870 * Allocate resources required to issue FW calls, when sysfs is
871 * accessed
872 */
873 if (megaraid_sysfs_alloc_resources(adapter) != 0)
874 goto out_free_irq;
875
876 // Set the DMA mask to 64-bit. All supported controllers as capable of
877 // DMA in this range
878 pci_read_config_dword(adapter->pdev, PCI_CONF_AMISIG64, &magic64);
879
880 if (((magic64 == HBA_SIGNATURE_64_BIT) &&
881 ((adapter->pdev->subsystem_device !=
882 PCI_SUBSYS_ID_MEGARAID_SATA_150_6) &&
883 (adapter->pdev->subsystem_device !=
884 PCI_SUBSYS_ID_MEGARAID_SATA_150_4))) ||
885 (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
886 adapter->pdev->device == PCI_DEVICE_ID_VERDE) ||
887 (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
888 adapter->pdev->device == PCI_DEVICE_ID_DOBSON) ||
889 (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
890 adapter->pdev->device == PCI_DEVICE_ID_LINDSAY) ||
891 (adapter->pdev->vendor == PCI_VENDOR_ID_DELL &&
892 adapter->pdev->device == PCI_DEVICE_ID_PERC4_DI_EVERGLADES) ||
893 (adapter->pdev->vendor == PCI_VENDOR_ID_DELL &&
894 adapter->pdev->device == PCI_DEVICE_ID_PERC4E_DI_KOBUK)) {
895 if (dma_set_mask(&adapter->pdev->dev, DMA_BIT_MASK(64))) {
896 con_log(CL_ANN, (KERN_WARNING
897 "megaraid: DMA mask for 64-bit failed\n"));
898
899 if (dma_set_mask(&adapter->pdev->dev,
900 DMA_BIT_MASK(32))) {
901 con_log(CL_ANN, (KERN_WARNING
902 "megaraid: 32-bit DMA mask failed\n"));
903 goto out_free_sysfs_res;
904 }
905 }
906 }
907
908 // setup tasklet for DPC
909 tasklet_init(&adapter->dpc_h, megaraid_mbox_dpc,
910 (unsigned long)adapter);
911
912 con_log(CL_DLEVEL1, (KERN_INFO
913 "megaraid mbox hba successfully initialized\n"));
914
915 return 0;
916
917 out_free_sysfs_res:
918 megaraid_sysfs_free_resources(adapter);
919 out_free_irq:
920 free_irq(adapter->irq, adapter);
921 out_alloc_cmds:
922 megaraid_free_cmd_packets(adapter);
923 out_iounmap:
924 if (raid_dev->baseaddr)
925 iounmap(raid_dev->baseaddr);
926 out_release_regions:
927 pci_release_regions(pdev);
928 out_free_raid_dev:
929 kfree(raid_dev);
930
931 return -1;
932 }
933
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH V4 net-next 5/5] icmp: add response to RFC 8335 PROBE messages
by kernel test robot
Hi Andreas,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Andreas-Roeseler/add-support-for...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 6f1629093399303bf19d6fcd5144061d1e25ec23
config: i386-randconfig-s032-20210314 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# https://github.com/0day-ci/linux/commit/54d9928f1734e7b3511b945a2ce912b93...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andreas-Roeseler/add-support-for-RFC-8335-PROBE/20210315-005052
git checkout 54d9928f1734e7b3511b945a2ce912b931a07776
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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/ipv4/icmp.c:1059:45: sparse: sparse: cast to restricted __be32
>> net/ipv4/icmp.c:1059:45: sparse: sparse: cast to restricted __be32
>> net/ipv4/icmp.c:1059:45: sparse: sparse: cast to restricted __be32
>> net/ipv4/icmp.c:1059:45: sparse: sparse: cast to restricted __be32
>> net/ipv4/icmp.c:1059:45: sparse: sparse: cast to restricted __be32
>> net/ipv4/icmp.c:1059:45: sparse: sparse: cast to restricted __be32
>> net/ipv4/icmp.c:1064:25: sparse: sparse: cast to restricted __be16
>> net/ipv4/icmp.c:1064:25: sparse: sparse: cast to restricted __be16
>> net/ipv4/icmp.c:1064:25: sparse: sparse: cast to restricted __be16
>> net/ipv4/icmp.c:1064:25: sparse: sparse: cast to restricted __be16
>> net/ipv4/icmp.c:1097:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct list_head const *head @@ got struct list_head [noderef] __rcu * @@
net/ipv4/icmp.c:1097:29: sparse: expected struct list_head const *head
net/ipv4/icmp.c:1097:29: sparse: got struct list_head [noderef] __rcu *
net/ipv4/icmp.c: note: in included file (through include/linux/spinlock.h, include/linux/mmzone.h, include/linux/gfp.h, ...):
include/linux/bottom_half.h:32:30: sparse: sparse: context imbalance in 'icmp_reply' - different lock contexts for basic block
include/linux/bottom_half.h:32:30: sparse: sparse: context imbalance in '__icmp_send' - different lock contexts for basic block
vim +1059 net/ipv4/icmp.c
976
977 /*
978 * Handle ICMP_ECHO ("ping") and ICMP_EXT_ECHO ("PROBE") requests.
979 *
980 * RFC 1122: 3.2.2.6 MUST have an echo server that answers ICMP echo
981 * requests.
982 * RFC 1122: 3.2.2.6 Data received in the ICMP_ECHO request MUST be
983 * included in the reply.
984 * RFC 1812: 4.3.3.6 SHOULD have a config option for silently ignoring
985 * echo requests, MUST have default=NOT.
986 * RFC 8335: 8 MUST have a config option to enable/disable ICMP
987 * Extended Echo Functionality, MUST be disabled by default
988 * See also WRT handling of options once they are done and working.
989 */
990
991 static bool icmp_echo(struct sk_buff *skb)
992 {
993 struct icmp_ext_hdr *ext_hdr, _ext_hdr;
994 struct icmp_ext_echo_iio *iio, _iio;
995 struct icmp_bxm icmp_param;
996 struct net_device *dev;
997 struct net *net;
998 u16 ident_len;
999 char *buff;
1000 u8 status;
1001
1002 net = dev_net(skb_dst(skb)->dev);
1003 /* should there be an ICMP stat for ignored echos? */
1004 if (net->ipv4.sysctl_icmp_echo_ignore_all)
1005 return true;
1006
1007 icmp_param.data.icmph = *icmp_hdr(skb);
1008 icmp_param.skb = skb;
1009 icmp_param.offset = 0;
1010 icmp_param.data_len = skb->len;
1011 icmp_param.head_len = sizeof(struct icmphdr);
1012
1013 if (icmp_param.data.icmph.type == ICMP_ECHO)
1014 goto send_reply;
1015 if (!net->ipv4.sysctl_icmp_echo_enable_probe)
1016 return true;
1017 /* We currently only support probing interfaces on the proxy node
1018 * Check to ensure L-bit is set
1019 */
1020 if (!(ntohs(icmp_param.data.icmph.un.echo.sequence) & 1))
1021 return true;
1022 /* Clear status bits in reply message */
1023 icmp_param.data.icmph.un.echo.sequence &= htons(0xFF00);
1024 icmp_param.data.icmph.type = ICMP_EXT_ECHOREPLY;
1025 ext_hdr = skb_header_pointer(skb, 0, sizeof(_ext_hdr), &_ext_hdr);
1026 iio = skb_header_pointer(skb, sizeof(_ext_hdr), sizeof(_iio), &_iio);
1027 if (!ext_hdr || !iio)
1028 goto send_mal_query;
1029 if (ntohs(iio->extobj_hdr.length) <= sizeof(iio->extobj_hdr))
1030 goto send_mal_query;
1031 ident_len = ntohs(iio->extobj_hdr.length) - sizeof(iio->extobj_hdr);
1032 status = 0;
1033 dev = NULL;
1034 switch (iio->extobj_hdr.class_type) {
1035 case EXT_ECHO_CTYPE_NAME:
1036 if (ident_len >= IFNAMSIZ)
1037 goto send_mal_query;
1038 buff = kcalloc(IFNAMSIZ, sizeof(char), GFP_KERNEL);
1039 if (!buff)
1040 return -ENOMEM;
1041 memcpy(buff, &iio->ident.name, ident_len);
1042 /* RFC 8335 2.1 If the Object Payload would not otherwise terminate
1043 * on a 32-bit boundary, it MUST be padded with ASCII NULL characters
1044 */
1045 if (ident_len % sizeof(u32) != 0) {
1046 u8 i;
1047
1048 for (i = ident_len; i % sizeof(u32) != 0; i++) {
1049 if (buff[i] != '\0')
1050 goto send_mal_query;
1051 }
1052 }
1053 dev = dev_get_by_name(net, buff);
1054 kfree(buff);
1055 break;
1056 case EXT_ECHO_CTYPE_INDEX:
1057 if (ident_len != sizeof(iio->ident.ifindex))
1058 goto send_mal_query;
> 1059 dev = dev_get_by_index(net, ntohl(iio->ident.ifindex));
1060 break;
1061 case EXT_ECHO_CTYPE_ADDR:
1062 if (ident_len != sizeof(iio->ident.addr.ctype3_hdr) + iio->ident.addr.ctype3_hdr.addrlen)
1063 goto send_mal_query;
> 1064 switch (ntohs(iio->ident.addr.ctype3_hdr.afi)) {
1065 case ICMP_AFI_IP:
1066 if (ident_len != sizeof(iio->ident.addr.ctype3_hdr) + sizeof(struct in_addr))
1067 goto send_mal_query;
1068 dev = ip_dev_find(net, iio->ident.addr.ip_addr.ipv4_addr.s_addr);
1069 break;
1070 #if IS_ENABLED(CONFIG_IPV6)
1071 case ICMP_AFI_IP6:
1072 if (ident_len != sizeof(iio->ident.addr.ctype3_hdr) + sizeof(struct in6_addr))
1073 goto send_mal_query;
1074 rcu_read_lock();
1075 dev = ipv6_dev_find(net, &iio->ident.addr.ip_addr.ipv6_addr, dev);
1076 if (dev)
1077 dev_hold(dev);
1078 rcu_read_unlock();
1079 break;
1080 #endif
1081 default:
1082 goto send_mal_query;
1083 }
1084 break;
1085 default:
1086 goto send_mal_query;
1087 }
1088 if (!dev) {
1089 icmp_param.data.icmph.code = ICMP_EXT_NO_IF;
1090 goto send_reply;
1091 }
1092 /* Fill bits in reply message */
1093 if (dev->flags & IFF_UP)
1094 status |= EXT_ECHOREPLY_ACTIVE;
1095 if (__in_dev_get_rcu(dev) && __in_dev_get_rcu(dev)->ifa_list)
1096 status |= EXT_ECHOREPLY_IPV4;
> 1097 if (!list_empty(&dev->ip6_ptr->addr_list))
1098 status |= EXT_ECHOREPLY_IPV6;
1099 dev_put(dev);
1100 icmp_param.data.icmph.un.echo.sequence |= htons(status);
1101 send_reply:
1102 icmp_reply(&icmp_param, skb);
1103 return true;
1104 send_mal_query:
1105 icmp_param.data.icmph.code = ICMP_EXT_MAL_QUERY;
1106 goto send_reply;
1107 }
1108
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[hare-scsi-devel:megaraid.v3 1/4] drivers/scsi/megaraid/megaraid_mbox.c:447:30: error: 'PCI_CONF_AMISIG' undeclared; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git megaraid.v3
head: 9369ca8fe8c5e0b78306ef343c6c1e1eaec77956
commit: 66215c55d4bc633a83910fb6ee5fa1464e6e9c08 [1/4] megaraid_mbox: Add support for legacy MegaRAID3 cards
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commi...
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel megaraid.v3
git checkout 66215c55d4bc633a83910fb6ee5fa1464e6e9c08
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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 >>):
drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_probe_one':
>> drivers/scsi/megaraid/megaraid_mbox.c:447:30: error: 'PCI_CONF_AMISIG' undeclared (first use in this function); did you mean 'PCI_CONF_AMISIG64'?
447 | pci_read_config_word(pdev, PCI_CONF_AMISIG, &magic);
| ^~~~~~~~~~~~~~~
| PCI_CONF_AMISIG64
drivers/scsi/megaraid/megaraid_mbox.c:447:30: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/scsi/megaraid/megaraid_mbox.c:448:16: error: 'HBA_SIGNATURE_471' undeclared (first use in this function); did you mean 'HBA_SIGNATURE_64_BIT'?
448 | if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
| ^~~~~~~~~~~~~~~~~
| HBA_SIGNATURE_64_BIT
>> drivers/scsi/megaraid/megaraid_mbox.c:448:46: error: 'HBA_SIGNATURE' undeclared (first use in this function)
448 | if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
| ^~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
Selected by
- FAULT_INJECTION_STACKTRACE_FILTER && FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT && !X86_64 && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
vim +447 drivers/scsi/megaraid/megaraid_mbox.c
398
399
400 /**
401 * megaraid_probe_one - PCI hotplug entry point
402 * @pdev : handle to this controller's PCI configuration space
403 * @id : pci device id of the class of controllers
404 *
405 * This routine should be called whenever a new adapter is detected by the
406 * PCI hotplug susbsystem.
407 */
408 static int
409 megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
410 {
411 adapter_t *adapter;
412
413
414 // detected a new controller
415 con_log(CL_ANN, (KERN_INFO
416 "megaraid: probe new device %#4.04x:%#4.04x:%#4.04x:%#4.04x: ",
417 pdev->vendor, pdev->device, pdev->subsystem_vendor,
418 pdev->subsystem_device));
419
420 con_log(CL_ANN, ("bus %d:slot %d:func %d\n", pdev->bus->number,
421 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)));
422
423 if (pci_enable_device(pdev)) {
424 con_log(CL_ANN, (KERN_WARNING
425 "megaraid: pci_enable_device failed\n"));
426
427 return -ENODEV;
428 }
429
430 // Enable bus-mastering on this controller
431 pci_set_master(pdev);
432
433 /*
434 * Older MegaRAID3 HBAs share the PCI ID with generic i960
435 * devices.
436 */
437 if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
438 u16 magic;
439 /*
440 * Don't fall over the Compaq management cards using the same
441 * PCI identifier
442 */
443 if (pdev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ &&
444 pdev->subsystem_device == 0xC000)
445 return -ENODEV;
446 /* Now check the magic signature byte */
> 447 pci_read_config_word(pdev, PCI_CONF_AMISIG, &magic);
> 448 if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
449 return -ENODEV;
450 }
451
452 // Allocate the per driver initialization structure
453 adapter = kzalloc(sizeof(adapter_t), GFP_KERNEL);
454
455 if (adapter == NULL) {
456 con_log(CL_ANN, (KERN_WARNING
457 "megaraid: out of memory, %s %d.\n", __func__, __LINE__));
458
459 goto out_probe_one;
460 }
461
462
463 // set up PCI related soft state and other pre-known parameters
464 adapter->unique_id = pdev->bus->number << 8 | pdev->devfn;
465 adapter->irq = pdev->irq;
466 adapter->pdev = pdev;
467
468 atomic_set(&adapter->being_detached, 0);
469
470 // Setup the default DMA mask. This would be changed later on
471 // depending on hardware capabilities
472 if (dma_set_mask(&adapter->pdev->dev, DMA_BIT_MASK(32))) {
473 con_log(CL_ANN, (KERN_WARNING
474 "megaraid: dma_set_mask failed:%d\n", __LINE__));
475
476 goto out_free_adapter;
477 }
478
479
480 // Initialize the synchronization lock for kernel and LLD
481 spin_lock_init(&adapter->lock);
482
483 // Initialize the command queues: the list of free SCBs and the list
484 // of pending SCBs.
485 INIT_LIST_HEAD(&adapter->kscb_pool);
486 spin_lock_init(SCSI_FREE_LIST_LOCK(adapter));
487
488 INIT_LIST_HEAD(&adapter->pend_list);
489 spin_lock_init(PENDING_LIST_LOCK(adapter));
490
491 INIT_LIST_HEAD(&adapter->completed_list);
492 spin_lock_init(COMPLETED_LIST_LOCK(adapter));
493
494
495 // Start the mailbox based controller
496 if (megaraid_init_mbox(adapter) != 0) {
497 con_log(CL_ANN, (KERN_WARNING
498 "megaraid: mailbox adapter did not initialize\n"));
499
500 goto out_free_adapter;
501 }
502
503 // Register with LSI Common Management Module
504 if (megaraid_cmm_register(adapter) != 0) {
505
506 con_log(CL_ANN, (KERN_WARNING
507 "megaraid: could not register with management module\n"));
508
509 goto out_fini_mbox;
510 }
511
512 // setup adapter handle in PCI soft state
513 pci_set_drvdata(pdev, adapter);
514
515 // attach with scsi mid-layer
516 if (megaraid_io_attach(adapter) != 0) {
517
518 con_log(CL_ANN, (KERN_WARNING "megaraid: io attach failed\n"));
519
520 goto out_cmm_unreg;
521 }
522
523 return 0;
524
525 out_cmm_unreg:
526 megaraid_cmm_unregister(adapter);
527 out_fini_mbox:
528 megaraid_fini_mbox(adapter);
529 out_free_adapter:
530 kfree(adapter);
531 out_probe_one:
532 pci_disable_device(pdev);
533
534 return -ENODEV;
535 }
536
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
ERROR: modpost: "__aeabi_unwind_cpp_pr0" undefined!
by kernel test robot
Hi Brad,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 88fe49249c99de14e543c632a46248d85411ab9e
commit: 2e74a01fb073900c8cc5df6b5e4bcbf575ac6c26 media: em28xx: Add support for Hauppauge USB QuadHD
date: 5 weeks ago
config: arm-randconfig-r024-20210314 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dfd27ebbd0eb137c9a439b7c537bb87ba903efd3)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2e74a01fb073900c8cc5df6b5e4bcbf575ac6c26
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 <<):
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/hwmon/corsair-cpro.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/hwmon/axi-fan-control.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/hwmon/atxp1.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/hwmon/asc7621.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/hwmon/as370-hwmon.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/hwmon/scpi-hwmon.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/hwmon/adt7462.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/hwmon/adt7411.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/hwmon/ad7418.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/hwmon/w83791d.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/hwmon/w83795.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/hwmon/occ/occ-p9-hwmon.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/axp288_fuel_gauge.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/tps65217_charger.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/smb347-charger.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/bq25890_charger.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/bq24735-charger.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/max77650-charger.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/charger-manager.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/lp8727_charger.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/twl4030_charger.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/isp1704_charger.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/rx51_battery.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/pcf50633-charger.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/twl4030_madc_battery.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/da9030_battery.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/bq27xxx_battery_hdq.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/sbs-manager.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/sbs-charger.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/ds2782_battery.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/cw2015_battery.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/cpcap-battery.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/wm8350_power.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/wm831x_power.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/wm831x_backup.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/pda_power.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/supply/generic-adc-battery.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/power/reset/nvmem-reboot-mode.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/w1/slaves/w1_ds28e17.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/w1/slaves/w1_ds250x.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/w1/slaves/w1_ds2430.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/w1/slaves/w1_ds2406.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/w1/masters/sgi_w1.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/w1/masters/ds1wm.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/pps/clients/pps-gpio.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-core/dvb-core.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/v4l2-core/videobuf-vmalloc.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/v4l2-core/videobuf-core.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/v4l2-core/tuner.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/v4l2-core/v4l2-dv-timings.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/v4l2-core/videodev.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/v4l2-core/v4l2-fwnode.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/mc/mc.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/tc90522.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/gp8psk-fe.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/af9033.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/m88rs2000.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/rtl2832.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/rtl2830.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/tda10071.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/sp2.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/a8293.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/tda18271c2dd.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/drxk.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/cxd2841er.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/cxd2820r.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/ix2505v.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/mb86a20s.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/drx39xyj/drx39xyj.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/ts2020.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/ds3000.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/isl6423.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/mn88473.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/mn88472.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/m88ds3103.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/stv6110x.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/stv090x.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/stv0900.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/stv6110.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/s921.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/stb6000.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/stv0288.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/si2168.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/si21xx.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/cx24120.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/cx24116.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/af9013.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/atbm8830.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/lgs8gxx.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/s5h1411.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/cx24113.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/tda10048.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/itd1000.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/s5h1409.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/dib0070.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/tda826x.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/tda10086.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/isl6421.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/cx24123.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/lg2160.ko] undefined!
>> ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/mxl692.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/lgdt3306a.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/lgdt3305.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/lgdt330x.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/s5h1420.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/bcm3510.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/nxt200x.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/stv0297.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/tda10023.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/drxd.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/cx22702.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/zl10353.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/zl10039.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/mt352.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/mt312.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/dib7000p.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/dibx000_common.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/dib3000mc.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/dib3000mb.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/stb6100.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/stb0899.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/stv0299.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/dvb-frontends/dvb-pll.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/go7007/s2250.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/go7007/go7007-loader.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/go7007/go7007-usb.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/go7007/go7007.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/em28xx/em28xx-rc.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/em28xx/em28xx-dvb.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/em28xx/em28xx.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/tm6000/tm6000-dvb.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/tm6000/tm6000.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/cx231xx/cx231xx-alsa.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/cx231xx/cx231xx.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/pvrusb2/pvrusb2.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/hdpvr/hdpvr.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/b2c2/b2c2-flexcop-usb.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/dvb-usb-dvbsky.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/dvb-usb-rtl28xxu.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/mxl111sf-demod.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/dvb-usb-mxl111sf.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/dvb-usb-gl861.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/dvb-usb-lmedm04.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/dvb-usb-ce6230.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/dvb-usb-az6007.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/dvb-usb-au6610.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/dvb-usb-anysee.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/dvb-usb-af9035.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/dvb-usb-af9015.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb-v2/dvb_usb_v2.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-technisat-usb2.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-az6027.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-cinergyT2.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-dw2102.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-af9005.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-opera.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-cxusb.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-dibusb-mc.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-dibusb-mb.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-a800.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-dibusb-mc-common.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-dibusb-common.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb-gp8psk.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/usb/dvb-usb/dvb-usb.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/common/cypress_firmware.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/common/tveeprom.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/common/cx2341x.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/common/videobuf2/videobuf2-dma-sg.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/common/videobuf2/videobuf2-vmalloc.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/common/videobuf2/videobuf2-memops.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/common/videobuf2/videobuf2-v4l2.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/common/videobuf2/videobuf2-common.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/common/b2c2/b2c2-flexcop.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/ir-mce_kbd-decoder.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/ir-sanyo-decoder.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/ir-sony-decoder.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/ir-rc6-decoder.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/rc-core.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-zx-irdec.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-x96max.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-xbox-dvd.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-su3000.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-winfast-usbii-deluxe.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-winfast.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-wetek-play2.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-wetek-hub.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-videostrong-kii-pro.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-videomate-tv-pvr.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-videomate-s350.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-videomate-m1f.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-vega-s9x.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-twinhan1027.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-twinhan-dtv-cab-ci.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-tt-1500.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-trekstor.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-total-media-in-hand-02.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-total-media-in-hand.ko] undefined!
ERROR: modpost: "__aeabi_unwind_cpp_pr0" [drivers/media/rc/keymaps/rc-tivo.ko] undefined!
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[hare-scsi-devel:virtio-vfc.v6 3/5] include/asm-generic/rwonce.h:59:1: error: expected declaration specifiers or '...' before 'do'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git virtio-vfc.v6
head: 7e3ab9aac391a4fb2aef468332128900bdef8df6
commit: 65a1d16588d3c3cb7b09f0f162c571be3533afc4 [3/5] virtio-scsi: Add FC transport class
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commi...
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel virtio-vfc.v6
git checkout 65a1d16588d3c3cb7b09f0f162c571be3533afc4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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 >>):
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/scsi/virtio_scsi.c:15:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:174:49: warning: ordered comparison of pointer with null pointer [-Wextra]
174 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:137:2: note: in expansion of macro 'BUG_ON'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:137:10: note: in expansion of macro 'virt_addr_valid'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/scsi/virtio_scsi.c: In function 'virtscsi_complete_cmd':
drivers/scsi/virtio_scsi.c:178:3: error: 'tgt' undeclared (first use in this function)
178 | tgt = rport->dd_data;
| ^~~
drivers/scsi/virtio_scsi.c:178:3: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/virtio_scsi.c: At top level:
drivers/scsi/virtio_scsi.c:848:2: error: expected declaration specifiers or '...' before 'rport'
848 | rport = starget_to_rport(starget);
| ^~~~~
drivers/scsi/virtio_scsi.c:849:2: error: expected declaration specifiers or '...' before 'if'
849 | if (rport) {
| ^~
In file included from ./arch/m68k/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:246,
from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/scsi/virtio_scsi.c:15:
>> include/asm-generic/rwonce.h:59:1: error: expected declaration specifiers or '...' before 'do'
59 | do { \
| ^~
arch/m68k/include/asm/atomic.h:20:26: note: in expansion of macro 'WRITE_ONCE'
20 | #define atomic_set(v, i) WRITE_ONCE(((v)->counter), (i))
| ^~~~~~~~~~
drivers/scsi/virtio_scsi.c:875:2: note: in expansion of macro 'atomic_set'
875 | atomic_set(&tgt->reqs, 0);
| ^~~~~~~~~~
drivers/scsi/virtio_scsi.c:876:2: error: expected declaration specifiers or '...' before 'tgt'
876 | tgt->req_vq = &vscsi->req_vqs[0];
| ^~~
drivers/scsi/virtio_scsi.c:877:2: error: expected declaration specifiers or '...' before 'tgt'
877 | tgt->vscsi = vscsi;
| ^~~
drivers/scsi/virtio_scsi.c:878:2: error: expected declaration specifiers or '...' before 'return'
878 | return 0;
| ^~~~~~
drivers/scsi/virtio_scsi.c:879:1: error: expected declaration specifiers or '...' before '}' token
879 | }
| ^
drivers/scsi/virtio_scsi.c:879:1: error: expected ';', ',' or ')' before '}' token
drivers/scsi/virtio_scsi.c: In function 'virtscsi_rescan_work':
drivers/scsi/virtio_scsi.c:951:8: error: implicit declaration of function 'virtscsi_kick_cmd'; did you mean 'virtscsi_kick_vq'? [-Werror=implicit-function-declaration]
951 | ret = virtscsi_kick_cmd(&vscsi->ctrl_vq, cmd, sizeof(cmd->req.rescan),
| ^~~~~~~~~~~~~~~~~
| virtscsi_kick_vq
drivers/scsi/virtio_scsi.c: At top level:
drivers/scsi/virtio_scsi.c:1119:5: warning: no previous prototype for 'virtscsi_scan_finished' [-Wmissing-prototypes]
1119 | int virtscsi_scan_finished(struct Scsi_Host *sh, unsigned long time)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/virtio_scsi.c:881:13: warning: 'virtscsi_target_destroy' defined but not used [-Wunused-function]
881 | static void virtscsi_target_destroy(struct scsi_target *starget)
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +59 include/asm-generic/rwonce.h
e506ea451254ab Will Deacon 2019-10-15 57
e506ea451254ab Will Deacon 2019-10-15 58 #define WRITE_ONCE(x, val) \
e506ea451254ab Will Deacon 2019-10-15 @59 do { \
e506ea451254ab Will Deacon 2019-10-15 60 compiletime_assert_rwonce_type(x); \
e506ea451254ab Will Deacon 2019-10-15 61 __WRITE_ONCE(x, val); \
e506ea451254ab Will Deacon 2019-10-15 62 } while (0)
e506ea451254ab Will Deacon 2019-10-15 63
:::::: The code at line 59 was first introduced by commit
:::::: e506ea451254ab17e0bf918ca36232fec2a9b10c compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.h
:::::: TO: Will Deacon <will(a)kernel.org>
:::::: CC: Will Deacon <will(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[hare-scsi-devel:virtio-vfc.v6 3/5] drivers/scsi/virtio_scsi.c:178:3: error: use of undeclared identifier 'tgt'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git virtio-vfc.v6
head: 7e3ab9aac391a4fb2aef468332128900bdef8df6
commit: 65a1d16588d3c3cb7b09f0f162c571be3533afc4 [3/5] virtio-scsi: Add FC transport class
config: riscv-randconfig-r036-20210314 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 7ee96429a0b057bcc97331a6a762fc3cd00aed61)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commi...
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel virtio-vfc.v6
git checkout 65a1d16588d3c3cb7b09f0f162c571be3533afc4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
>> drivers/scsi/virtio_scsi.c:178:3: error: use of undeclared identifier 'tgt'
tgt = rport->dd_data;
^
>> drivers/scsi/virtio_scsi.c:840:22: error: expected ')'
struct Scsi_Host *sh;
^
drivers/scsi/virtio_scsi.c:839:33: note: to match this '('
static int virtscsi_target_alloc(
^
>> drivers/scsi/virtio_scsi.c:848:2: warning: declaration specifier missing, defaulting to 'int'
rport = starget_to_rport(starget);
^
int
>> drivers/scsi/virtio_scsi.c:848:2: error: redefinition of 'rport' with a different type: 'int' vs 'struct fc_rport *'
drivers/scsi/virtio_scsi.c:843:19: note: previous definition is here
struct fc_rport *rport;
^
>> drivers/scsi/virtio_scsi.c:848:10: error: statement expression not allowed at file scope
rport = starget_to_rport(starget);
^
include/scsi/scsi_transport_fc.h:428:36: note: expanded from macro 'starget_to_rport'
scsi_is_fc_rport(s->dev.parent) ? dev_to_rport(s->dev.parent) : NULL
^
include/scsi/scsi_transport_fc.h:395:2: note: expanded from macro 'dev_to_rport'
container_of(d, struct fc_rport, dev)
^
include/linux/kernel.h:692:41: note: expanded from macro 'container_of'
#define container_of(ptr, type, member) ({ \
^
>> drivers/scsi/virtio_scsi.c:848:27: error: use of undeclared identifier 'starget'
rport = starget_to_rport(starget);
^
>> drivers/scsi/virtio_scsi.c:849:2: error: expected identifier or '('
if (rport) {
^
drivers/scsi/virtio_scsi.c:853:4: error: expected identifier or '('
} else {
^
drivers/scsi/virtio_scsi.c:874:2: error: expected identifier or '('
seqcount_init(&tgt->tgt_seq);
^
include/linux/seqlock.h:92:2: note: expanded from macro 'seqcount_init'
do { \
^
drivers/scsi/virtio_scsi.c:874:2: error: expected identifier or '('
include/linux/seqlock.h:95:4: note: expanded from macro 'seqcount_init'
} while (0)
^
>> drivers/scsi/virtio_scsi.c:875:13: error: expected parameter declarator
atomic_set(&tgt->reqs, 0);
^
drivers/scsi/virtio_scsi.c:875:13: error: expected ')'
drivers/scsi/virtio_scsi.c:875:12: note: to match this '('
atomic_set(&tgt->reqs, 0);
^
drivers/scsi/virtio_scsi.c:875:2: warning: declaration specifier missing, defaulting to 'int'
atomic_set(&tgt->reqs, 0);
^
int
>> drivers/scsi/virtio_scsi.c:875:12: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
atomic_set(&tgt->reqs, 0);
^
void
>> drivers/scsi/virtio_scsi.c:875:2: error: conflicting types for 'atomic_set'
atomic_set(&tgt->reqs, 0);
^
arch/riscv/include/asm/atomic.h:32:29: note: previous definition is here
static __always_inline void atomic_set(atomic_t *v, int i)
^
>> drivers/scsi/virtio_scsi.c:876:2: error: unknown type name 'tgt'
tgt->req_vq = &vscsi->req_vqs[0];
^
drivers/scsi/virtio_scsi.c:876:5: error: expected identifier or '('
tgt->req_vq = &vscsi->req_vqs[0];
^
drivers/scsi/virtio_scsi.c:877:2: error: unknown type name 'tgt'
tgt->vscsi = vscsi;
^
drivers/scsi/virtio_scsi.c:877:5: error: expected identifier or '('
tgt->vscsi = vscsi;
^
drivers/scsi/virtio_scsi.c:878:2: error: expected identifier or '('
return 0;
^
>> drivers/scsi/virtio_scsi.c:879:1: error: extraneous closing brace ('}')
}
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
vim +/tgt +178 drivers/scsi/virtio_scsi.c
156
157 /*
158 * virtscsi_complete_cmd - finish a scsi_cmd and invoke scsi_done
159 *
160 * Called with vq_lock held.
161 */
162 static void virtscsi_complete_cmd(struct virtio_scsi *vscsi, void *buf)
163 {
164 struct virtio_scsi_cmd *cmd = buf;
165 #if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
166 struct fc_rport *rport;
167 #endif
168 struct scsi_cmnd *sc = cmd->sc;
169 struct virtio_scsi_cmd_resp *resp = &cmd->resp.cmd;
170
171 dev_dbg(&sc->device->sdev_gendev,
172 "cmd %p response %u status %#02x sense_len %u\n",
173 sc, resp->response, resp->status, resp->sense_len);
174
175 #if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
176 rport = starget_to_rport(scsi_target(sc->device));
177 if (rport)
> 178 tgt = rport->dd_data;
179 #endif
180 sc->result = resp->status;
181 virtscsi_compute_resid(sc, virtio32_to_cpu(vscsi->vdev, resp->resid));
182 switch (resp->response) {
183 case VIRTIO_SCSI_S_OK:
184 set_host_byte(sc, DID_OK);
185 break;
186 case VIRTIO_SCSI_S_OVERRUN:
187 set_host_byte(sc, DID_ERROR);
188 break;
189 case VIRTIO_SCSI_S_ABORTED:
190 set_host_byte(sc, DID_ABORT);
191 break;
192 case VIRTIO_SCSI_S_BAD_TARGET:
193 set_host_byte(sc, DID_BAD_TARGET);
194 break;
195 case VIRTIO_SCSI_S_RESET:
196 set_host_byte(sc, DID_RESET);
197 break;
198 case VIRTIO_SCSI_S_BUSY:
199 set_host_byte(sc, DID_BUS_BUSY);
200 break;
201 case VIRTIO_SCSI_S_TRANSPORT_FAILURE:
202 set_host_byte(sc, DID_TRANSPORT_DISRUPTED);
203 break;
204 case VIRTIO_SCSI_S_TARGET_FAILURE:
205 set_host_byte(sc, DID_TARGET_FAILURE);
206 break;
207 case VIRTIO_SCSI_S_NEXUS_FAILURE:
208 set_host_byte(sc, DID_NEXUS_FAILURE);
209 break;
210 default:
211 scmd_printk(KERN_WARNING, sc, "Unknown response %d",
212 resp->response);
213 fallthrough;
214 case VIRTIO_SCSI_S_FAILURE:
215 set_host_byte(sc, DID_ERROR);
216 break;
217 }
218
219 WARN_ON(virtio32_to_cpu(vscsi->vdev, resp->sense_len) >
220 VIRTIO_SCSI_SENSE_SIZE);
221 if (sc->sense_buffer) {
222 memcpy(sc->sense_buffer, resp->sense,
223 min_t(u32,
224 virtio32_to_cpu(vscsi->vdev, resp->sense_len),
225 VIRTIO_SCSI_SENSE_SIZE));
226 if (resp->sense_len)
227 set_driver_byte(sc, DRIVER_SENSE);
228 }
229
230 sc->scsi_done(sc);
231 }
232
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[hare-scsi-devel:virtio-vfc.v6 3/5] drivers/scsi/virtio_scsi.c:178:3: error: 'tgt' undeclared
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git virtio-vfc.v6
head: 7e3ab9aac391a4fb2aef468332128900bdef8df6
commit: 65a1d16588d3c3cb7b09f0f162c571be3533afc4 [3/5] virtio-scsi: Add FC transport class
config: arm64-randconfig-r012-20210314 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commi...
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel virtio-vfc.v6
git checkout 65a1d16588d3c3cb7b09f0f162c571be3533afc4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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 >>):
drivers/scsi/virtio_scsi.c: In function 'virtscsi_complete_cmd':
>> drivers/scsi/virtio_scsi.c:178:3: error: 'tgt' undeclared (first use in this function)
178 | tgt = rport->dd_data;
| ^~~
drivers/scsi/virtio_scsi.c:178:3: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/virtio_scsi.c: At top level:
>> drivers/scsi/virtio_scsi.c:848:2: error: expected declaration specifiers or '...' before 'rport'
848 | rport = starget_to_rport(starget);
| ^~~~~
drivers/scsi/virtio_scsi.c:849:2: error: expected declaration specifiers or '...' before 'if'
849 | if (rport) {
| ^~
In file included from include/linux/atomic.h:82,
from include/asm-generic/bitops/atomic.h:5,
from arch/arm64/include/asm/bitops.h:26,
from include/linux/bitops.h:32,
from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/scsi/virtio_scsi.c:15:
include/asm-generic/atomic-instrumented.h:48:20: error: expected declaration specifiers or '...' before 'atomic_set'
48 | #define atomic_set atomic_set
| ^~~~~~~~~~
drivers/scsi/virtio_scsi.c:875:2: note: in expansion of macro 'atomic_set'
875 | atomic_set(&tgt->reqs, 0);
| ^~~~~~~~~~
drivers/scsi/virtio_scsi.c:876:2: error: expected declaration specifiers or '...' before 'tgt'
876 | tgt->req_vq = &vscsi->req_vqs[0];
| ^~~
drivers/scsi/virtio_scsi.c:877:2: error: expected declaration specifiers or '...' before 'tgt'
877 | tgt->vscsi = vscsi;
| ^~~
drivers/scsi/virtio_scsi.c:878:2: error: expected declaration specifiers or '...' before 'return'
878 | return 0;
| ^~~~~~
drivers/scsi/virtio_scsi.c:879:1: error: expected declaration specifiers or '...' before '}' token
879 | }
| ^
drivers/scsi/virtio_scsi.c:879:1: error: expected ';', ',' or ')' before '}' token
drivers/scsi/virtio_scsi.c: In function 'virtscsi_rescan_work':
drivers/scsi/virtio_scsi.c:951:8: error: implicit declaration of function 'virtscsi_kick_cmd'; did you mean 'virtscsi_kick_vq'? [-Werror=implicit-function-declaration]
951 | ret = virtscsi_kick_cmd(&vscsi->ctrl_vq, cmd, sizeof(cmd->req.rescan),
| ^~~~~~~~~~~~~~~~~
| virtscsi_kick_vq
drivers/scsi/virtio_scsi.c: At top level:
drivers/scsi/virtio_scsi.c:1119:5: warning: no previous prototype for 'virtscsi_scan_finished' [-Wmissing-prototypes]
1119 | int virtscsi_scan_finished(struct Scsi_Host *sh, unsigned long time)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/virtio_scsi.c:881:13: warning: 'virtscsi_target_destroy' defined but not used [-Wunused-function]
881 | static void virtscsi_target_destroy(struct scsi_target *starget)
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/tgt +178 drivers/scsi/virtio_scsi.c
156
157 /*
158 * virtscsi_complete_cmd - finish a scsi_cmd and invoke scsi_done
159 *
160 * Called with vq_lock held.
161 */
162 static void virtscsi_complete_cmd(struct virtio_scsi *vscsi, void *buf)
163 {
164 struct virtio_scsi_cmd *cmd = buf;
165 #if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
166 struct fc_rport *rport;
167 #endif
168 struct scsi_cmnd *sc = cmd->sc;
169 struct virtio_scsi_cmd_resp *resp = &cmd->resp.cmd;
170
171 dev_dbg(&sc->device->sdev_gendev,
172 "cmd %p response %u status %#02x sense_len %u\n",
173 sc, resp->response, resp->status, resp->sense_len);
174
175 #if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
176 rport = starget_to_rport(scsi_target(sc->device));
177 if (rport)
> 178 tgt = rport->dd_data;
179 #endif
180 sc->result = resp->status;
181 virtscsi_compute_resid(sc, virtio32_to_cpu(vscsi->vdev, resp->resid));
182 switch (resp->response) {
183 case VIRTIO_SCSI_S_OK:
184 set_host_byte(sc, DID_OK);
185 break;
186 case VIRTIO_SCSI_S_OVERRUN:
187 set_host_byte(sc, DID_ERROR);
188 break;
189 case VIRTIO_SCSI_S_ABORTED:
190 set_host_byte(sc, DID_ABORT);
191 break;
192 case VIRTIO_SCSI_S_BAD_TARGET:
193 set_host_byte(sc, DID_BAD_TARGET);
194 break;
195 case VIRTIO_SCSI_S_RESET:
196 set_host_byte(sc, DID_RESET);
197 break;
198 case VIRTIO_SCSI_S_BUSY:
199 set_host_byte(sc, DID_BUS_BUSY);
200 break;
201 case VIRTIO_SCSI_S_TRANSPORT_FAILURE:
202 set_host_byte(sc, DID_TRANSPORT_DISRUPTED);
203 break;
204 case VIRTIO_SCSI_S_TARGET_FAILURE:
205 set_host_byte(sc, DID_TARGET_FAILURE);
206 break;
207 case VIRTIO_SCSI_S_NEXUS_FAILURE:
208 set_host_byte(sc, DID_NEXUS_FAILURE);
209 break;
210 default:
211 scmd_printk(KERN_WARNING, sc, "Unknown response %d",
212 resp->response);
213 fallthrough;
214 case VIRTIO_SCSI_S_FAILURE:
215 set_host_byte(sc, DID_ERROR);
216 break;
217 }
218
219 WARN_ON(virtio32_to_cpu(vscsi->vdev, resp->sense_len) >
220 VIRTIO_SCSI_SENSE_SIZE);
221 if (sc->sense_buffer) {
222 memcpy(sc->sense_buffer, resp->sense,
223 min_t(u32,
224 virtio32_to_cpu(vscsi->vdev, resp->sense_len),
225 VIRTIO_SCSI_SENSE_SIZE));
226 if (resp->sense_len)
227 set_driver_byte(sc, DRIVER_SENSE);
228 }
229
230 sc->scsi_done(sc);
231 }
232
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months