All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [linux-next:master 5141/13159] net/bridge/br_mdb.c:553:6: warning: Variable 'err' is reassigned a value before the old one has been used. 'break; '
Date: Sun, 04 Oct 2020 21:20:38 +0800	[thread overview]
Message-ID: <202010042126.UI9NEYn4-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
TO: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
CC: Jakub Kicinski <kuba@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   2172e358cd1713c5b7c31361ac465edfe55e455c
commit: 81f1983852fd1f956c0a1d465cfc6116e99e2adc [5141/13159] net: bridge: mdb: use mdb and port entries in notifications
:::::: branch date: 2 days ago
:::::: commit date: 4 weeks ago
compiler: riscv32-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


vim +553 net/bridge/br_mdb.c

47d5b6db2afa766 Andrew Lunn         2017-11-09  503  
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  504  void br_mdb_notify(struct net_device *dev,
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  505  		   struct net_bridge_mdb_entry *mp,
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  506  		   struct net_bridge_port_group *pg,
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  507  		   int type)
45ebcce56823d14 Elad Raz            2016-04-21  508  {
45ebcce56823d14 Elad Raz            2016-04-21  509  	struct br_mdb_complete_info *complete_info;
f1fecb1d10ecc2f Elad Raz            2016-01-10  510  	struct switchdev_obj_port_mdb mdb = {
f1fecb1d10ecc2f Elad Raz            2016-01-10  511  		.obj = {
f1fecb1d10ecc2f Elad Raz            2016-01-10  512  			.id = SWITCHDEV_OBJ_ID_PORT_MDB,
f1fecb1d10ecc2f Elad Raz            2016-01-10  513  			.flags = SWITCHDEV_F_DEFER,
f1fecb1d10ecc2f Elad Raz            2016-01-10  514  		},
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  515  		.vid = mp->addr.vid,
f1fecb1d10ecc2f Elad Raz            2016-01-10  516  	};
37a393bc4932d7b Cong Wang           2012-12-11  517  	struct net *net = dev_net(dev);
37a393bc4932d7b Cong Wang           2012-12-11  518  	struct sk_buff *skb;
37a393bc4932d7b Cong Wang           2012-12-11  519  	int err = -ENOBUFS;
37a393bc4932d7b Cong Wang           2012-12-11  520  
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  521  	if (pg) {
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  522  		if (mp->addr.proto == htons(ETH_P_IP))
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  523  			ip_eth_mc_map(mp->addr.u.ip4, mdb.addr);
f1fecb1d10ecc2f Elad Raz            2016-01-10  524  #if IS_ENABLED(CONFIG_IPV6)
f1fecb1d10ecc2f Elad Raz            2016-01-10  525  		else
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  526  			ipv6_eth_mc_map(&mp->addr.u.ip6, mdb.addr);
f1fecb1d10ecc2f Elad Raz            2016-01-10  527  #endif
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  528  		mdb.obj.orig_dev = pg->port->dev;
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  529  		switch (type) {
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  530  		case RTM_NEWMDB:
45ebcce56823d14 Elad Raz            2016-04-21  531  			complete_info = kmalloc(sizeof(*complete_info), GFP_ATOMIC);
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  532  			if (!complete_info)
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  533  				break;
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  534  			complete_info->port = pg->port;
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  535  			complete_info->ip = mp->addr;
45ebcce56823d14 Elad Raz            2016-04-21  536  			mdb.obj.complete_priv = complete_info;
45ebcce56823d14 Elad Raz            2016-04-21  537  			mdb.obj.complete = br_mdb_complete;
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  538  			if (switchdev_port_obj_add(pg->port->dev, &mdb.obj, NULL))
1bfb15967395764 Eduardo Valentin    2017-07-11  539  				kfree(complete_info);
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  540  			break;
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  541  		case RTM_DELMDB:
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  542  			switchdev_port_obj_del(pg->port->dev, &mdb.obj);
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  543  			break;
45ebcce56823d14 Elad Raz            2016-04-21  544  		}
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  545  	} else {
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  546  		br_mdb_switchdev_host(dev, mp, type);
9e8430f8d60d985 Elad Raz            2016-02-03  547  	}
f1fecb1d10ecc2f Elad Raz            2016-01-10  548  
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07  549  	skb = nlmsg_new(rtnl_mdb_nlmsg_size(pg), GFP_ATOMIC);
37a393bc4932d7b Cong Wang           2012-12-11  550  	if (!skb)
37a393bc4932d7b Cong Wang           2012-12-11  551  		goto errout;
37a393bc4932d7b Cong Wang           2012-12-11  552  
81f1983852fd1f9 Nikolay Aleksandrov 2020-09-07 @553  	err = nlmsg_populate_mdb_fill(skb, dev, mp, pg, type);
37a393bc4932d7b Cong Wang           2012-12-11  554  	if (err < 0) {
37a393bc4932d7b Cong Wang           2012-12-11  555  		kfree_skb(skb);
37a393bc4932d7b Cong Wang           2012-12-11  556  		goto errout;
37a393bc4932d7b Cong Wang           2012-12-11  557  	}
37a393bc4932d7b Cong Wang           2012-12-11  558  
37a393bc4932d7b Cong Wang           2012-12-11  559  	rtnl_notify(skb, net, 0, RTNLGRP_MDB, NULL, GFP_ATOMIC);
37a393bc4932d7b Cong Wang           2012-12-11  560  	return;
37a393bc4932d7b Cong Wang           2012-12-11  561  errout:
37a393bc4932d7b Cong Wang           2012-12-11  562  	rtnl_set_sk_err(net, RTNLGRP_MDB, err);
37a393bc4932d7b Cong Wang           2012-12-11  563  }
37a393bc4932d7b Cong Wang           2012-12-11  564  

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

                 reply	other threads:[~2020-10-04 13:20 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=202010042126.UI9NEYn4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.