WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] convert some use of "if (condition) BUG()" to "BUG_ON(co

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] convert some use of "if (condition) BUG()" to "BUG_ON(condition)" in netback driver.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Tue, 28 Jun 2005 06:06:50 +0000
Cc: james@xxxxxxxxxxxxx
Delivery-date: Tue, 28 Jun 2005 08:02:14 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1761, 2005/06/28 07:06:50+01:00, vh249@xxxxxxxxxxxxxxxxxxxxxx

        convert some use of "if (condition) BUG()" to "BUG_ON(condition)" in 
netback driver.
        
        Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>



 netback.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c 
b/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c     2005-06-28 
04:03:25 -04:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c     2005-06-28 
04:03:26 -04:00
@@ -297,8 +297,7 @@
         netif->stats.tx_packets++;
 
         /* The update_va_mapping() must not fail. */
-        if ( unlikely(mcl[0].result != 0) )
-            BUG();
+        BUG_ON(mcl[0].result != 0);
 
         /* Check the reassignment error code. */
         status = NETIF_RSP_OKAY;
@@ -441,8 +440,7 @@
     while ( dealloc_cons != dp )
     {
         /* The update_va_mapping() must not fail. */
-        if ( unlikely(mcl[0].result != 0) )
-            BUG();
+        BUG_ON(mcl[0].result != 0);
 
         pending_idx = dealloc_ring[MASK_PEND_IDX(dealloc_cons++)];
 
@@ -794,8 +792,8 @@
     
     netif_interface_init();
 
-    if ( (mmap_vstart = allocate_empty_lowmem_region(MAX_PENDING_REQS)) == 0 )
-        BUG();
+    mmap_vstart = allocate_empty_lowmem_region(MAX_PENDING_REQS);
+    BUG_ON(mmap_vstart == 0);
 
     for ( i = 0; i < MAX_PENDING_REQS; i++ )
     {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] convert some use of "if (condition) BUG()" to "BUG_ON(condition)" in netback driver., BitKeeper Bot <=