Also, simplify multiple-nested if construct. Signed-off-by: Borislav Petkov <petkovbb@xxxxxxxxx> --- drivers/ide/ide-tape.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index a54c1cb..99d6b29 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -2278,7 +2278,7 @@ static void idetape_restart_speed_control(ide_drive_t *drive) tape->uncontrolled_previous_head_time = jiffies; } -static int idetape_init_read(ide_drive_t *drive, int max_stages) +static int idetape_init_read(ide_drive_t *drive) { idetape_tape_t *tape = drive->driver_data; struct request rq; @@ -2562,13 +2562,13 @@ static ssize_t idetape_chrdev_read(struct file *file, char __user *buf, debug_log(DBG_CHRDEV, "Enter %s, count %Zd\n", __func__, count); - if (tape->chrdev_dir != IDETAPE_DIR_READ) { - if (test_bit(IDETAPE_FLAG_DETECT_BS, &tape->flags)) - if (count > tape->blk_size && - (count % tape->blk_size) == 0) - tape->user_bs_factor = count / tape->blk_size; - } - rc = idetape_init_read(drive, tape->max_stages); + if (tape->chrdev_dir != IDETAPE_DIR_READ && + test_bit(IDETAPE_FLAG_DETECT_BS, &tape->flags) && + count > tape->blk_size && + (count % tape->blk_size) == 0) + tape->user_bs_factor = count / tape->blk_size; + + rc = idetape_init_read(drive); if (rc < 0) return rc; if (count == 0) -- 1.5.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html