Skip to contentSkip to conversation

xen: events: Replace BUG() with BUG_ON()

PATCH In review Shyam Saini 2 participants 3 messages Dec 24, 2016 – Jan 3, 2017 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: events: Replace BUG() with BUG_ON()

Replace BUG() with BUG_ON() using coccinelle

---
 drivers/xen/events/events_fifo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/xen/events/events_fifo.c +1 -2
index c03f9c8..3c41470 100644
@@ -369,8 +369,7 @@ static void evtchn_fifo_resume(void)
 		}
 
 		ret = init_control_block(cpu, control_block);
-		if (ret < 0)
-			BUG();
+		BUG_ON(ret < 0);
 	}
 
 	/*
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Shyam Saini

Replace BUG() with BUG_ON() using coccinelle

Quoted 10 lines
---
 drivers/xen/events/events_fifo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/xen/events/events_fifo.c +0 -0
index c03f9c8..3c41470 100644

drivers/xen/events/events_fifo.c static void evtchn_fifo_resume(void) · line 375

Quoted 9 lines
drivers/xen/events/events_fifo.c +1 -2
@@ -369,8 +369,7 @@ static void evtchn_fifo_resume(void)
 		}
 
 		ret = init_control_block(cpu, control_block);
-		if (ret < 0)
-			BUG();
+		BUG_ON(ret < 0);
 	}
 
 	/*

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel