diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-31 18:28:11 -0500 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-03-31 18:28:11 -0500 |
commit | 3a8dc8930eab1209fd5063f6646a98e58a796eeb (patch) | |
tree | 4877f3523fc90d93f4fab720f9729c48ff1317c4 /drivers | |
parent | e048a8a688f07b17dbde9a96cab3759b900eae14 (diff) |
BUG_ON() Conversion in drivers/s390/char/tape_block.c
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/char/tape_block.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 5ced2725d6c7..5c65cf3e5cc0 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -198,9 +198,7 @@ tapeblock_request_fn(request_queue_t *queue) | |||
198 | 198 | ||
199 | device = (struct tape_device *) queue->queuedata; | 199 | device = (struct tape_device *) queue->queuedata; |
200 | DBF_LH(6, "tapeblock_request_fn(device=%p)\n", device); | 200 | DBF_LH(6, "tapeblock_request_fn(device=%p)\n", device); |
201 | if (device == NULL) | 201 | BUG_ON(device == NULL); |
202 | BUG(); | ||
203 | |||
204 | tapeblock_trigger_requeue(device); | 202 | tapeblock_trigger_requeue(device); |
205 | } | 203 | } |
206 | 204 | ||
@@ -307,8 +305,7 @@ tapeblock_revalidate_disk(struct gendisk *disk) | |||
307 | int rc; | 305 | int rc; |
308 | 306 | ||
309 | device = (struct tape_device *) disk->private_data; | 307 | device = (struct tape_device *) disk->private_data; |
310 | if (!device) | 308 | BUG_ON(!device); |
311 | BUG(); | ||
312 | 309 | ||
313 | if (!device->blk_data.medium_changed) | 310 | if (!device->blk_data.medium_changed) |
314 | return 0; | 311 | return 0; |
@@ -440,11 +437,9 @@ tapeblock_ioctl( | |||
440 | 437 | ||
441 | rc = 0; | 438 | rc = 0; |
442 | disk = inode->i_bdev->bd_disk; | 439 | disk = inode->i_bdev->bd_disk; |
443 | if (!disk) | 440 | BUG_ON(!disk); |
444 | BUG(); | ||
445 | device = disk->private_data; | 441 | device = disk->private_data; |
446 | if (!device) | 442 | BUG_ON(!device); |
447 | BUG(); | ||
448 | minor = iminor(inode); | 443 | minor = iminor(inode); |
449 | 444 | ||
450 | DBF_LH(6, "tapeblock_ioctl(0x%0x)\n", command); | 445 | DBF_LH(6, "tapeblock_ioctl(0x%0x)\n", command); |