Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=757ced8983a0b8d1bb353128605cec0f7a6f633e
Commit:     757ced8983a0b8d1bb353128605cec0f7a6f633e
Parent:     f373bd820dd80ae079537afb9db511b8802bb9f7
Author:     Borislav Petkov <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 2 19:56:37 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Sat Feb 2 19:56:37 2008 +0100

    ide-floppy: remove unused flag PC_ABORT
    
    This flag was never being set in the code so remove it. By the way, the
    code in the second patch was being executed unconditionally, i.e. in case
    pc->retries > IDEFLOPPY_MAX_PC_RETRIES is true (actually that is the only 
case
    when the outer if-test passed), !test_bit(PC_ABORT, &pc->flags)
    was always true so the comment is now incorrect and has to go.
    
    Signed-off-by: Borislav Petkov <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide-floppy.c |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index b56e37d..01701ca 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -107,7 +107,6 @@ typedef struct idefloppy_packet_command_s {
 /*
  *     Packet command flag bits.
  */
-#define        PC_ABORT                        0       /* Set when an error is 
considered normal - We won't retry */
 #define PC_DMA_RECOMMENDED             2       /* 1 when we prefer to use DMA 
if possible */
 #define        PC_DMA_IN_PROGRESS              3       /* 1 while DMA in 
progress */
 #define        PC_DMA_ERROR                    4       /* 1 when encountered 
problem during DMA */
@@ -733,18 +732,12 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t 
*drive, idefloppy_pc_t *p
        /* Set the current packet command */
        floppy->pc = pc;
 
-       if (pc->retries > IDEFLOPPY_MAX_PC_RETRIES ||
-           test_bit(PC_ABORT, &pc->flags)) {
-               /*
-                *      We will "abort" retrying a packet command in case
-                *      a legitimate error code was received.
-                */
-               if (!test_bit(PC_ABORT, &pc->flags)) {
-                       if (!test_bit(PC_SUPPRESS_ERROR, &pc->flags))
-                               ide_floppy_report_error(floppy, pc);
-                       /* Giving up */
-                       pc->error = IDEFLOPPY_ERROR_GENERAL;
-               }
+       if (pc->retries > IDEFLOPPY_MAX_PC_RETRIES) {
+               if (!test_bit(PC_SUPPRESS_ERROR, &pc->flags))
+                       ide_floppy_report_error(floppy, pc);
+               /* Giving up */
+               pc->error = IDEFLOPPY_ERROR_GENERAL;
+
                floppy->failed_pc = NULL;
                pc->callback(drive);
                return ide_stopped;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to