direct-io.hg

changeset 5588:5937352bfe66

bitkeeper revision 1.1760.1.1 (42c0e8fa-Uxs1rA3BiXdTbynda9HmA)

convert some use of "if (condition) BUG()" to "BUG_ON(condition)" in netback driver.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
author vh249@arcadians.cl.cam.ac.uk
date Tue Jun 28 06:06:50 2005 +0000 (2005-06-28)
parents b08cd3331fdb
children 9bcdcf2dbb54 f9eade8778af
files linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c	Mon Jun 27 20:17:02 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c	Tue Jun 28 06:06:50 2005 +0000
     1.3 @@ -297,8 +297,7 @@ static void net_rx_action(unsigned long 
     1.4          netif->stats.tx_packets++;
     1.5  
     1.6          /* The update_va_mapping() must not fail. */
     1.7 -        if ( unlikely(mcl[0].result != 0) )
     1.8 -            BUG();
     1.9 +        BUG_ON(mcl[0].result != 0);
    1.10  
    1.11          /* Check the reassignment error code. */
    1.12          status = NETIF_RSP_OKAY;
    1.13 @@ -441,8 +440,7 @@ static void net_tx_action(unsigned long 
    1.14      while ( dealloc_cons != dp )
    1.15      {
    1.16          /* The update_va_mapping() must not fail. */
    1.17 -        if ( unlikely(mcl[0].result != 0) )
    1.18 -            BUG();
    1.19 +        BUG_ON(mcl[0].result != 0);
    1.20  
    1.21          pending_idx = dealloc_ring[MASK_PEND_IDX(dealloc_cons++)];
    1.22  
    1.23 @@ -794,8 +792,8 @@ static int __init netback_init(void)
    1.24      
    1.25      netif_interface_init();
    1.26  
    1.27 -    if ( (mmap_vstart = allocate_empty_lowmem_region(MAX_PENDING_REQS)) == 0 )
    1.28 -        BUG();
    1.29 +    mmap_vstart = allocate_empty_lowmem_region(MAX_PENDING_REQS);
    1.30 +    BUG_ON(mmap_vstart == 0);
    1.31  
    1.32      for ( i = 0; i < MAX_PENDING_REQS; i++ )
    1.33      {