Netdev List
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	netdev@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: [PATCH] macvtap: fix bugon.cocci warnings
Date: Wed, 8 Jun 2016 18:15:29 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1606081814180.2890@hadrien> (raw)

 Use BUG_ON instead of a if condition followed by BUG.

Generated by: scripts/coccinelle/misc/bugon.cocci

CC: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 macvtap.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -796,8 +796,7 @@ static ssize_t macvtap_put_user(struct m

 		ret = virtio_net_hdr_from_skb(skb, &vnet_hdr,
 					      macvtap_is_little_endian(q));
-		if (ret)
-			BUG();
+		BUG_ON(ret);

 		if (copy_to_iter(&vnet_hdr, sizeof(vnet_hdr), iter) !=
 		    sizeof(vnet_hdr))

             reply	other threads:[~2016-06-08 16:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08 16:15 Julia Lawall [this message]
2016-06-08 18:30 ` [PATCH] macvtap: fix bugon.cocci warnings David Miller
2016-06-08 20:59   ` Julia Lawall

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=alpine.DEB.2.10.1606081814180.2890@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=virtualization@lists.linux-foundation.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