Commit 99d74e61 authored by Borislav Petkov's avatar Borislav Petkov Committed by Bartlomiej Zolnierkiewicz

ide-tape: remove unused parameter from idetape_copy_stage_to_user

Signed-off-by: default avatarBorislav Petkov <petkovbb@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 5e69bd95
...@@ -1619,7 +1619,7 @@ static int idetape_copy_stage_from_user(idetape_tape_t *tape, ...@@ -1619,7 +1619,7 @@ static int idetape_copy_stage_from_user(idetape_tape_t *tape,
} }
static int idetape_copy_stage_to_user(idetape_tape_t *tape, char __user *buf, static int idetape_copy_stage_to_user(idetape_tape_t *tape, char __user *buf,
idetape_stage_t *stage, int n) int n)
{ {
struct idetape_bh *bh = tape->bh; struct idetape_bh *bh = tape->bh;
int count; int count;
...@@ -2493,8 +2493,7 @@ static ssize_t idetape_chrdev_read(struct file *file, char __user *buf, ...@@ -2493,8 +2493,7 @@ static ssize_t idetape_chrdev_read(struct file *file, char __user *buf,
if (tape->merge_stage_size) { if (tape->merge_stage_size) {
actually_read = min((unsigned int)(tape->merge_stage_size), actually_read = min((unsigned int)(tape->merge_stage_size),
(unsigned int)count); (unsigned int)count);
if (idetape_copy_stage_to_user(tape, buf, tape->merge_stage, if (idetape_copy_stage_to_user(tape, buf, actually_read))
actually_read))
ret = -EFAULT; ret = -EFAULT;
buf += actually_read; buf += actually_read;
tape->merge_stage_size -= actually_read; tape->merge_stage_size -= actually_read;
...@@ -2504,8 +2503,7 @@ static ssize_t idetape_chrdev_read(struct file *file, char __user *buf, ...@@ -2504,8 +2503,7 @@ static ssize_t idetape_chrdev_read(struct file *file, char __user *buf,
bytes_read = idetape_add_chrdev_read_request(drive, ctl); bytes_read = idetape_add_chrdev_read_request(drive, ctl);
if (bytes_read <= 0) if (bytes_read <= 0)
goto finish; goto finish;
if (idetape_copy_stage_to_user(tape, buf, tape->merge_stage, if (idetape_copy_stage_to_user(tape, buf, bytes_read))
bytes_read))
ret = -EFAULT; ret = -EFAULT;
buf += bytes_read; buf += bytes_read;
count -= bytes_read; count -= bytes_read;
...@@ -2516,8 +2514,7 @@ static ssize_t idetape_chrdev_read(struct file *file, char __user *buf, ...@@ -2516,8 +2514,7 @@ static ssize_t idetape_chrdev_read(struct file *file, char __user *buf,
if (bytes_read <= 0) if (bytes_read <= 0)
goto finish; goto finish;
temp = min((unsigned long)count, (unsigned long)bytes_read); temp = min((unsigned long)count, (unsigned long)bytes_read);
if (idetape_copy_stage_to_user(tape, buf, tape->merge_stage, if (idetape_copy_stage_to_user(tape, buf, temp))
temp))
ret = -EFAULT; ret = -EFAULT;
actually_read += temp; actually_read += temp;
tape->merge_stage_size = bytes_read-temp; tape->merge_stage_size = bytes_read-temp;
......
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