mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.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'
Date: Tue, 19 Apr 2022 11:36:27 +0800	[thread overview]
Message-ID: <202204191122.amoOMw5g-lkp@intel.com> (raw)

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@intel.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@chinatelecom.cn>
:::::: CC: David S. Miller <davem@davemloft.net>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-04-19  3:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202204191122.amoOMw5g-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®