[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] convert some use of "if (condition) BUG()" to "BUG_ON(condition)" in netback driver.



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.