Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b42fa133 authored by Masatake YAMATO's avatar Masatake YAMATO Committed by Bartlomiej Zolnierkiewicz
Browse files

ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy



Look at wait_drive_not_busy in drivers/ide/ide-taskfile.c:

    static u8 wait_drive_not_busy(ide_drive_t *drive)
    {
            ide_hwif_t *hwif = HWIF(drive);
            int retries = 100;
            u8 stat;

            /*
             * Last sector was transfered, wait until drive is ready.
             * This can take up to 10 usec, but we will wait max 1 ms
             * (drive_cmd_intr() waits that long).
             */
            while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--)
                    udelay(10);

            if (!retries)
                    printk(KERN_ERR "%s: drive still BUSY!\n", drive->name);

            return stat;
    }

`printk' is never called because `retries' never holds zero at the
outside of `while' loop: when `retries' holds zero at the while's loop
condition, `retries' will hold -1 at the if condition.

Signed-off-by: default avatarMasatake YAMATO <jet@gyve.org>
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: joe@perches.com
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 872aad45
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment