diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-06-23 05:06:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:43:08 -0400 |
commit | 125e18745f16685f69a34fd6130d47598fc4bf54 (patch) | |
tree | c97ed94b0525a572efa1bd4990a55b18be5d781d /drivers/ide/ide-iops.c | |
parent | 78ce89c92bc6eaf5933b5664bff64253a7103bd7 (diff) |
[PATCH] More BUG_ON conversion
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index b72dde70840a..97a49e77a8f1 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -939,8 +939,7 @@ void ide_execute_command(ide_drive_t *drive, task_ioreg_t cmd, ide_handler_t *ha | |||
939 | 939 | ||
940 | spin_lock_irqsave(&ide_lock, flags); | 940 | spin_lock_irqsave(&ide_lock, flags); |
941 | 941 | ||
942 | if(hwgroup->handler) | 942 | BUG_ON(hwgroup->handler); |
943 | BUG(); | ||
944 | hwgroup->handler = handler; | 943 | hwgroup->handler = handler; |
945 | hwgroup->expiry = expiry; | 944 | hwgroup->expiry = expiry; |
946 | hwgroup->timer.expires = jiffies + timeout; | 945 | hwgroup->timer.expires = jiffies + timeout; |
@@ -981,8 +980,7 @@ static ide_startstop_t atapi_reset_pollfunc (ide_drive_t *drive) | |||
981 | printk("%s: ATAPI reset complete\n", drive->name); | 980 | printk("%s: ATAPI reset complete\n", drive->name); |
982 | } else { | 981 | } else { |
983 | if (time_before(jiffies, hwgroup->poll_timeout)) { | 982 | if (time_before(jiffies, hwgroup->poll_timeout)) { |
984 | if (HWGROUP(drive)->handler != NULL) | 983 | BUG_ON(HWGROUP(drive)->handler != NULL); |
985 | BUG(); | ||
986 | ide_set_handler(drive, &atapi_reset_pollfunc, HZ/20, NULL); | 984 | ide_set_handler(drive, &atapi_reset_pollfunc, HZ/20, NULL); |
987 | /* continue polling */ | 985 | /* continue polling */ |
988 | return ide_started; | 986 | return ide_started; |
@@ -1021,8 +1019,7 @@ static ide_startstop_t reset_pollfunc (ide_drive_t *drive) | |||
1021 | 1019 | ||
1022 | if (!OK_STAT(tmp = hwif->INB(IDE_STATUS_REG), 0, BUSY_STAT)) { | 1020 | if (!OK_STAT(tmp = hwif->INB(IDE_STATUS_REG), 0, BUSY_STAT)) { |
1023 | if (time_before(jiffies, hwgroup->poll_timeout)) { | 1021 | if (time_before(jiffies, hwgroup->poll_timeout)) { |
1024 | if (HWGROUP(drive)->handler != NULL) | 1022 | BUG_ON(HWGROUP(drive)->handler != NULL); |
1025 | BUG(); | ||
1026 | ide_set_handler(drive, &reset_pollfunc, HZ/20, NULL); | 1023 | ide_set_handler(drive, &reset_pollfunc, HZ/20, NULL); |
1027 | /* continue polling */ | 1024 | /* continue polling */ |
1028 | return ide_started; | 1025 | return ide_started; |
@@ -1138,8 +1135,7 @@ static ide_startstop_t do_reset1 (ide_drive_t *drive, int do_not_try_atapi) | |||
1138 | hwgroup = HWGROUP(drive); | 1135 | hwgroup = HWGROUP(drive); |
1139 | 1136 | ||
1140 | /* We must not reset with running handlers */ | 1137 | /* We must not reset with running handlers */ |
1141 | if(hwgroup->handler != NULL) | 1138 | BUG_ON(hwgroup->handler != NULL); |
1142 | BUG(); | ||
1143 | 1139 | ||
1144 | /* For an ATAPI device, first try an ATAPI SRST. */ | 1140 | /* For an ATAPI device, first try an ATAPI SRST. */ |
1145 | if (drive->media != ide_disk && !do_not_try_atapi) { | 1141 | if (drive->media != ide_disk && !do_not_try_atapi) { |