linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] ide: make "paranoia" ->handler check in ide_intr() more strict
@ 2008-12-29 19:04 Bartlomiej Zolnierkiewicz
  2008-12-29 19:04 ` [PATCH 2/6] ide: use ide_pci_is_in_compatibility_mode() helper in setup-pci.c Bartlomiej Zolnierkiewicz
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-12-29 19:04 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ide: make "paranoia" ->handler check in ide_intr() more strict

If ->handler is set while it shouldn't be it indicates deep problems
so BUG_ON()-ning and preventing further damage is much more appropriate
than merely printing an error message.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
trivia for pata-2.6 tree

 drivers/ide/ide-io.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Index: b/drivers/ide/ide-io.c
===================================================================
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1159,12 +1159,9 @@ irqreturn_t ide_intr (int irq, void *dev
 	 * won't allow another of the same (on any CPU) until we return.
 	 */
 	if (startstop == ide_stopped) {
-		if (hwif->handler == NULL) {	/* paranoia */
-			ide_unlock_port(hwif);
-			plug_device = 1;
-		} else
-			printk(KERN_ERR "%s: %s: huh? expected NULL handler "
-					"on exit\n", __func__, drive->name);
+		BUG_ON(hwif->handler);
+		ide_unlock_port(hwif);
+		plug_device = 1;
 	}
 out_handled:
 	irq_ret = IRQ_HANDLED;

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-12-29 19:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-29 19:04 [PATCH 1/6] ide: make "paranoia" ->handler check in ide_intr() more strict Bartlomiej Zolnierkiewicz
2008-12-29 19:04 ` [PATCH 2/6] ide: use ide_pci_is_in_compatibility_mode() helper in setup-pci.c Bartlomiej Zolnierkiewicz
2008-12-29 19:04 ` [PATCH 3/6] ide: remove superfluous hwif variable assignment from ide_timer_expiry() Bartlomiej Zolnierkiewicz
2008-12-29 19:04 ` [PATCH 4/6] ide: struct ide_atapi_pc - remove unused fields and update documentation Bartlomiej Zolnierkiewicz
2008-12-29 19:04 ` [PATCH 5/6] ide: remove unused ide_hwif_t.sg_mapped field Bartlomiej Zolnierkiewicz
2008-12-29 19:04 ` [PATCH 6/6] ide: remove now redundant ->cur_dev checks Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).