ide: remove redundant BUG_ON() from [atapi_]reset_pollfunc()
PATCH 2/5 ide: remove redundant BUG_ON() from [atapi_]reset_pollfunc()
Same BUG_ON() is present inside ide_set_handler().
--- drivers/ide/ide-iops.c | 2 -- 1 file changed, 2 deletions(-)
drivers/ide/ide-iops.c +0 -2
@@ -860,7 +860,6 @@ static ide_startstop_t atapi_reset_pollfprintk ("%s: ATAPI reset complete\n" , drive->name); }else {if (time_before (jiffies, hwgroup->poll_timeout)) { -BUG_ON (HWGROUP (drive)->handler !=NULL );ide_set_handler (drive, &atapi_reset_pollfunc,HZ /20 ,NULL );/* continue polling */ return ide_started;
@@ -900,7 +899,6 @@ static ide_startstop_t reset_pollfunc (iif (!OK_STAT (tmp = hwif->INB (IDE_STATUS_REG ),0 ,BUSY_STAT )) {if (time_before (jiffies, hwgroup->poll_timeout)) { -BUG_ON (HWGROUP (drive)->handler !=NULL );ide_set_handler (drive, &reset_pollfunc,HZ /20 ,NULL );/* continue polling */ return ide_started;
Quoted 1 line · Bartlomiej Zolnierkiewicz
Same
BUG_ON()is present insideide_set_handler().
There is no BUG_ON there -- __ide_set_handler() has a check for the same
condition and a printk(KERN_CRIT)... myabe it should be replaced with BUG_ON()...
Quoted 1 line
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
MBR, Sergei
Quoted 6 lines · Sergei Shtylyov
Quoted 1 line · Bartlomiej Zolnierkiewicz
Same
BUG_ON()is present insideide_set_handler().There is no
BUG_ONthere --__ide_set_handler()has a check for the same
condition and aprintk(KERN_CRIT)... myabe it should be replaced withBUG_ON()...
Yeah, you're right - care to make a patch?
Quoted 5 lines
Quoted 1 line
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Acked-by Sergei Shtylyov <[email protected]>MBR, Sergei
Quoted 6 lines · Bartlomiej Zolnierkiewicz
Quoted 4 lines
Quoted 1 line
Same
BUG_ON()is present insideide_set_handler().There is no
BUG_ONthere --__ide_set_handler()has a check for the same
condition and aprintk(KERN_CRIT)... myabe it should be replaced withBUG_ON()...Yeah, you're right - care to make a patch?
Replacing printk() with BUG_ON() and also removing BUG_ON() fromide_execute_command()? OK, will do...
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Acked-by Sergei Shtylyov <[email protected]>
MBR, Sergei