[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202204191122.amoOMw5g-lkp@intel.com>
Date: Tue, 19 Apr 2022 11:36:27 +0800
From: kernel test robot <lkp@...el.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [mingo-tip:sched/headers 2140/2356]
drivers/net/bonding/bond_alb.c:1299:6: warning: incompatible integer to
pointer conversion assigning to 'struct icmp6hdr *' from 'int'
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: af93551cf39027d176f30b9beafc60a4c130998a
commit: 3ca2f09b7faf17b5e78cb699d3315e5accbe0216 [2140/2356] headers/deps: net: Optimize <net/ndisc.h> dependencies, remove <net/ndisc_api.h> inclusion
config: i386-randconfig-a016-20220418 (https://download.01.org/0day-ci/archive/20220419/202204191122.amoOMw5g-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 429cbac0390654f90bba18a41799464adf31a5ec)
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/mingo/tip.git/commit/?id=3ca2f09b7faf17b5e78cb699d3315e5accbe0216
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 3ca2f09b7faf17b5e78cb699d3315e5accbe0216
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/bluetooth/ drivers/misc/ drivers/net/bonding/ drivers/net/ethernet/marvell/prestera/ drivers/net/ethernet/microchip/lan966x/ drivers/net/netdevsim/ drivers/net/phy/ drivers/power/supply/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/net/bonding/bond_alb.c:1299:8: error: implicit declaration of function 'icmp6_hdr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
hdr = icmp6_hdr(skb);
^
>> drivers/net/bonding/bond_alb.c:1299:6: warning: incompatible integer to pointer conversion assigning to 'struct icmp6hdr *' from 'int' [-Wint-conversion]
hdr = icmp6_hdr(skb);
^ ~~~~~~~~~~~~~~
drivers/net/bonding/bond_alb.c:1300:28: error: use of undeclared identifier 'NDISC_NEIGHBOUR_ADVERTISEMENT'
return hdr->icmp6_type == NDISC_NEIGHBOUR_ADVERTISEMENT ||
^
drivers/net/bonding/bond_alb.c:1301:22: error: use of undeclared identifier 'NDISC_NEIGHBOUR_SOLICITATION'
hdr->icmp6_type == NDISC_NEIGHBOUR_SOLICITATION;
^
1 warning and 3 errors generated.
vim +1299 drivers/net/bonding/bond_alb.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 1282
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1283 /* determine if the packet is NA or NS */
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1284 static bool alb_determine_nd(struct sk_buff *skb, struct bonding *bond)
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1285 {
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1286 struct ipv6hdr *ip6hdr;
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1287 struct icmp6hdr *hdr;
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1288
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1289 if (!pskb_network_may_pull(skb, sizeof(*ip6hdr)))
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1290 return true;
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1291
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1292 ip6hdr = ipv6_hdr(skb);
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1293 if (ip6hdr->nexthdr != IPPROTO_ICMPV6)
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1294 return false;
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1295
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1296 if (!pskb_network_may_pull(skb, sizeof(*ip6hdr) + sizeof(*hdr)))
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1297 return true;
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1298
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 @1299 hdr = icmp6_hdr(skb);
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1300 return hdr->icmp6_type == NDISC_NEIGHBOUR_ADVERTISEMENT ||
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1301 hdr->icmp6_type == NDISC_NEIGHBOUR_SOLICITATION;
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1302 }
0da8aa00bfcfeb3 Sun Shouxin 2022-01-28 1303
:::::: The code at line 1299 was first introduced by commit
:::::: 0da8aa00bfcfeb3f4e6537dd8e2001e0727ba549 net: bonding: Add support for IPV6 ns/na to balance-alb/balance-tlb mode
:::::: TO: Sun Shouxin <sunshouxin@...natelecom.cn>
:::::: CC: David S. Miller <davem@...emloft.net>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists