Commit 9798630a authored by Borislav Petkov's avatar Borislav Petkov Committed by Bartlomiej Zolnierkiewicz

ide-tape: make __idetape_discard_read_pipeline() of type void

It always returns 0 which has no effect on tape positioning calculation so
simplify it by converting its type to void, bringing no functional change to the
driver.
Signed-off-by: default avatarBorislav Petkov <petkovbb@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent fd0949e6
...@@ -1641,12 +1641,12 @@ static int idetape_create_prevent_cmd(ide_drive_t *drive, ...@@ -1641,12 +1641,12 @@ static int idetape_create_prevent_cmd(ide_drive_t *drive,
return 1; return 1;
} }
static int __idetape_discard_read_pipeline(ide_drive_t *drive) static void __idetape_discard_read_pipeline(ide_drive_t *drive)
{ {
idetape_tape_t *tape = drive->driver_data; idetape_tape_t *tape = drive->driver_data;
if (tape->chrdev_dir != IDETAPE_DIR_READ) if (tape->chrdev_dir != IDETAPE_DIR_READ)
return 0; return;
clear_bit(IDETAPE_FLAG_FILEMARK, &tape->flags); clear_bit(IDETAPE_FLAG_FILEMARK, &tape->flags);
tape->merge_stage_size = 0; tape->merge_stage_size = 0;
...@@ -1656,8 +1656,6 @@ static int __idetape_discard_read_pipeline(ide_drive_t *drive) ...@@ -1656,8 +1656,6 @@ static int __idetape_discard_read_pipeline(ide_drive_t *drive)
} }
tape->chrdev_dir = IDETAPE_DIR_NONE; tape->chrdev_dir = IDETAPE_DIR_NONE;
return 0;
} }
/* /*
...@@ -1689,13 +1687,12 @@ static void idetape_discard_read_pipeline(ide_drive_t *drive, ...@@ -1689,13 +1687,12 @@ static void idetape_discard_read_pipeline(ide_drive_t *drive,
int restore_position) int restore_position)
{ {
idetape_tape_t *tape = drive->driver_data; idetape_tape_t *tape = drive->driver_data;
int cnt;
int seek, position; int seek, position;
cnt = __idetape_discard_read_pipeline(drive); __idetape_discard_read_pipeline(drive);
if (restore_position) { if (restore_position) {
position = idetape_read_position(drive); position = idetape_read_position(drive);
seek = position > cnt ? position - cnt : 0; seek = position > 0 ? position : 0;
if (idetape_position_tape(drive, seek, 0, 0)) { if (idetape_position_tape(drive, seek, 0, 0)) {
printk(KERN_INFO "ide-tape: %s: position_tape failed in" printk(KERN_INFO "ide-tape: %s: position_tape failed in"
" discard_pipeline()\n", tape->name); " discard_pipeline()\n", tape->name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment