Skip to contentSkip to conversation

ide cleanups - remove unneeded BUG_ON()

PATCH New Eric Sesterhenn / snakebyte 1 participant 1 message Feb 1, 2006 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 ide cleanups - remove unneeded BUG_ON()

hi,

this patch removes a bunch of BUG_ON() checks for
the hwgroup handler, since __ide_set_handler bugs
now if it is already set.

drivers/ide/ide-cd.c renamed from drivers/ide/ide-cd.c.orig +0 -2
@@ -1721,8 +1721,6 @@ static ide_startstop_t cdrom_newpc_intr(
 		}
 	}
 
-	BUG_ON(drive->hwif->hwgroup->handler != NULL);
-
 	ide_set_handler(drive, cdrom_newpc_intr, rq->timeout, NULL);
 	return ide_started;
 
drivers/ide/ide-floppy.c renamed from drivers/ide/ide-floppy.c.orig +0 -4
@@ -897,7 +897,6 @@ static ide_startstop_t idefloppy_pc_intr
 					"to send us more data than expected "
 					"- discarding data\n");
 				idefloppy_discard_data(drive,bcount.all);
-				BUG_ON(drive->hwif->hwgroup->handler != NULL);
 				ide_set_handler(drive,
 						&idefloppy_pc_intr,
 						IDEFLOPPY_WAIT_CMD,
@@ -930,7 +929,6 @@ static ide_startstop_t idefloppy_pc_intr
 	pc->actually_transferred += bcount.all;
 	pc->current_position += bcount.all;
 
-	BUG_ON(drive->hwif->hwgroup->handler != NULL);
 	ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL);		/* And set the interrupt handler again */
 	return ide_started;
 }
@@ -957,7 +955,6 @@ static ide_startstop_t idefloppy_transfe
 				"issuing a packet command\n");
 		return ide_do_reset(drive);
 	}
-	BUG_ON(drive->hwif->hwgroup->handler != NULL);
 	/* Set the interrupt routine */
 	ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL);
 	/* Send the actual packet */
@@ -1013,7 +1010,6 @@ static ide_startstop_t idefloppy_transfe
 	 * 40 and 50msec work well. idefloppy_pc_intr will not be actually
 	 * used until after the packet is moved in about 50 msec.
 	 */
-	BUG_ON(drive->hwif->hwgroup->handler != NULL);
 	ide_set_handler(drive, 
 	  &idefloppy_pc_intr, 		/* service routine for packet command */
 	  floppy->ticks,		/* wait this long before "failing" */
drivers/ide/ide-iops.c renamed from drivers/ide/ide-iops.c.orig +0 -2
@@ -981,7 +981,6 @@ static ide_startstop_t atapi_reset_pollf
 		printk("%s: ATAPI reset complete\n", drive->name);
 	} else {
 		if (time_before(jiffies, hwgroup->poll_timeout)) {
-			BUG_ON(drive->hwif->hwgroup->handler != NULL);
 			ide_set_handler(drive, &atapi_reset_pollfunc, HZ/20, NULL);
 			/* continue polling */
 			return ide_started;
@@ -1020,7 +1019,6 @@ static ide_startstop_t reset_pollfunc (i
 
 	if (!OK_STAT(tmp = hwif->INB(IDE_STATUS_REG), 0, BUSY_STAT)) {
 		if (time_before(jiffies, hwgroup->poll_timeout)) {
-			BUG_ON(drive->hwif->hwgroup->handler != NULL);
 			ide_set_handler(drive, &reset_pollfunc, HZ/20, NULL);
 			/* continue polling */
 			return ide_started;
drivers/ide/ide-taskfile.c renamed from drivers/ide/ide-taskfile.c.orig +0 -1
@@ -195,7 +195,6 @@ ide_startstop_t set_geometry_intr (ide_d
 	if (stat & (ERR_STAT|DRQ_STAT))
 		return ide_error(drive, "set_geometry_intr", stat);
 
-	BUG_ON(drive->hwif->hwgroup->handler != NULL);
 	ide_set_handler(drive, &set_geometry_intr, WAIT_WORSTCASE, NULL);
 	return ide_started;
 }
drivers/ide/pci/trm290.c renamed from drivers/ide/pci/trm290.c.orig +0 -1
@@ -183,7 +183,6 @@ static void trm290_ide_dma_exec_cmd(ide_
 {
 	ide_hwif_t *hwif	= HWIF(drive);
 
-	BUG_ON(drive->hwif->hwgroup->handler != NULL);	/* paranoia check */
 	ide_set_handler(drive, &ide_dma_intr, WAIT_CMD, NULL);
 	/* issue cmd to drive */
 	hwif->OUTB(command, IDE_COMMAND_REG);

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors