Netdev List
 help / color / mirror / Atom feed
* [PATCH] macvtap: fix bugon.cocci warnings
@ 2016-06-08 16:15 Julia Lawall
  2016-06-08 18:30 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2016-06-08 16:15 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: Michael S. Tsirkin, netdev, virtualization

 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))

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-08 20:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-08 16:15 [PATCH] macvtap: fix bugon.cocci warnings Julia Lawall
2016-06-08 18:30 ` David Miller
2016-06-08 20:59   ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox