Commit 606f4422 authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Adrian Bunk

BUG_ON() Conversion in drivers/s390/block/dasd_devmap.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.
Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent f02e1faf
...@@ -437,8 +437,7 @@ dasd_forget_ranges(void) ...@@ -437,8 +437,7 @@ dasd_forget_ranges(void)
spin_lock(&dasd_devmap_lock); spin_lock(&dasd_devmap_lock);
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
list_for_each_entry_safe(devmap, n, &dasd_hashlists[i], list) { list_for_each_entry_safe(devmap, n, &dasd_hashlists[i], list) {
if (devmap->device != NULL) BUG_ON(devmap->device != NULL);
BUG();
list_del(&devmap->list); list_del(&devmap->list);
kfree(devmap); kfree(devmap);
} }
...@@ -547,8 +546,7 @@ dasd_delete_device(struct dasd_device *device) ...@@ -547,8 +546,7 @@ dasd_delete_device(struct dasd_device *device)
/* First remove device pointer from devmap. */ /* First remove device pointer from devmap. */
devmap = dasd_find_busid(device->cdev->dev.bus_id); devmap = dasd_find_busid(device->cdev->dev.bus_id);
if (IS_ERR(devmap)) BUG_ON(IS_ERR(devmap));
BUG();
spin_lock(&dasd_devmap_lock); spin_lock(&dasd_devmap_lock);
if (devmap->device != device) { if (devmap->device != device) {
spin_unlock(&dasd_devmap_lock); spin_unlock(&dasd_devmap_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment