lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 02 Feb 2009 22:38:14 +0100
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	linux-ide@...r.kernel.org
Cc:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 09/14] ide: inline task_in_unexpected() into task_pio_intr()

From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Subject: [PATCH] ide: inline task_in_unexpected() into task_pio_intr()

task_in_unexpected() is only used by task_pio_intr() so inline it there.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
---
 drivers/ide/ide-taskfile.c |   36 +++++++++++++-----------------------
 1 file changed, 13 insertions(+), 23 deletions(-)

Index: b/drivers/ide/ide-taskfile.c
===================================================================
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -310,27 +310,6 @@ void ide_finish_cmd(ide_drive_t *drive, st
 }
 
 /*
- * We got an interrupt on a task_in case, but no errors and no DRQ.
- *
- * It might be a spurious irq (shared irq), but it might be a
- * command that had no output.
- */
-static ide_startstop_t task_in_unexpected(ide_drive_t *drive,
-					  struct ide_cmd *cmd, u8 stat)
-{
-	/* Command all done? */
-	if (OK_STAT(stat, ATA_DRDY, ATA_BUSY)) {
-		ide_finish_cmd(drive, cmd, stat);
-		return ide_stopped;
-	}
-
-	/* Assume it was a spurious irq */
-	ide_set_handler(drive, &task_pio_intr, WAIT_WORSTCASE, NULL);
-
-	return ide_started;
-}
-
-/*
  * Handler for command with PIO data phase.
  */
 static ide_startstop_t task_pio_intr(ide_drive_t *drive)
@@ -346,8 +325,19 @@ static ide_startstop_t task_pio_intr(ide
 			return task_error(drive, cmd, __func__, stat);
 
 		/* Didn't want any data? Odd. */
-		if ((stat & ATA_DRQ) == 0)
-			return task_in_unexpected(drive, cmd, stat);
+		if ((stat & ATA_DRQ) == 0) {
+			/* Command all done? */
+			if (OK_STAT(stat, ATA_DRDY, ATA_BUSY)) {
+				ide_finish_cmd(drive, cmd, stat);
+				return ide_stopped;
+			}
+
+			/* Assume it was a spurious irq */
+			ide_set_handler(drive, &task_pio_intr, WAIT_WORSTCASE,
+					NULL);
+
+			return ide_started;
+		}
 	} else {
 		if (!OK_STAT(stat, DRIVE_READY, drive->bad_wstat))
 			return task_error(drive, cmd, __func__, stat);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ