LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: CGEL <cgel.zte@gmail.com>
To: Jay Vosburgh <j.vosburgh@gmail.com>
Cc: Veaceslav Falico <vfalico@gmail.com>,
Andy Gospodarek <andy@greyhouse.net>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Changcheng Deng <deng.changcheng@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH linux-next] net: bonding: bond_alb: Replace if (cond) BUG() with BUG_ON()
Date: Fri, 27 Aug 2021 18:02:30 -0700 [thread overview]
Message-ID: <20210828010230.11022-1-deng.changcheng@zte.com.cn> (raw)
From: Changcheng Deng <deng.changcheng@zte.com.cn>
Fix the following coccinelle reports:
./drivers/net/bonding/bond_alb.c:976:3-6 WARNING: Use BUG_ON instead of
if condition followed by BUG.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
drivers/net/bonding/bond_alb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 7d3752c..3288022 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -972,8 +972,7 @@ static int alb_upper_dev_walk(struct net_device *upper,
*/
if (netif_is_macvlan(upper) && !strict_match) {
tags = bond_verify_device_path(bond->dev, upper, 0);
- if (IS_ERR_OR_NULL(tags))
- BUG();
+ BUG_ON(IS_ERR_OR_NULL(tags));
alb_send_lp_vid(slave, upper->dev_addr,
tags[0].vlan_proto, tags[0].vlan_id);
kfree(tags);
--
1.8.3.1
next reply other threads:[~2021-08-28 1:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-28 1:02 CGEL [this message]
2021-08-30 17:36 ` Jakub Kicinski
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=20210828010230.11022-1-deng.changcheng@zte.com.cn \
--to=cgel.zte@gmail.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=deng.changcheng@zte.com.cn \
--cc=j.vosburgh@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vfalico@gmail.com \
--cc=zealci@zte.com.cn \
--subject='Re: [PATCH linux-next] net: bonding: bond_alb: Replace if (cond) BUG() with BUG_ON()' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).