Commit 8646c88f authored by Borislav Petkov's avatar Borislav Petkov Committed by Bartlomiej Zolnierkiewicz

ide-tape: remove unused parameter from idetape_copy_stage_from_user

Signed-off-by: default avatarBorislav Petkov <petkovbb@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 99d74e61
...@@ -1587,7 +1587,7 @@ static idetape_stage_t *__idetape_kmalloc_stage(idetape_tape_t *tape, int full, ...@@ -1587,7 +1587,7 @@ static idetape_stage_t *__idetape_kmalloc_stage(idetape_tape_t *tape, int full,
} }
static int idetape_copy_stage_from_user(idetape_tape_t *tape, static int idetape_copy_stage_from_user(idetape_tape_t *tape,
idetape_stage_t *stage, const char __user *buf, int n) const char __user *buf, int n)
{ {
struct idetape_bh *bh = tape->bh; struct idetape_bh *bh = tape->bh;
int count; int count;
...@@ -2588,8 +2588,7 @@ static ssize_t idetape_chrdev_write(struct file *file, const char __user *buf, ...@@ -2588,8 +2588,7 @@ static ssize_t idetape_chrdev_write(struct file *file, const char __user *buf,
actually_written = min((unsigned int) actually_written = min((unsigned int)
(tape->stage_size - tape->merge_stage_size), (tape->stage_size - tape->merge_stage_size),
(unsigned int)count); (unsigned int)count);
if (idetape_copy_stage_from_user(tape, tape->merge_stage, buf, if (idetape_copy_stage_from_user(tape, buf, actually_written))
actually_written))
ret = -EFAULT; ret = -EFAULT;
buf += actually_written; buf += actually_written;
tape->merge_stage_size += actually_written; tape->merge_stage_size += actually_written;
...@@ -2605,8 +2604,7 @@ static ssize_t idetape_chrdev_write(struct file *file, const char __user *buf, ...@@ -2605,8 +2604,7 @@ static ssize_t idetape_chrdev_write(struct file *file, const char __user *buf,
} }
while (count >= tape->stage_size) { while (count >= tape->stage_size) {
ssize_t retval; ssize_t retval;
if (idetape_copy_stage_from_user(tape, tape->merge_stage, buf, if (idetape_copy_stage_from_user(tape, buf, tape->stage_size))
tape->stage_size))
ret = -EFAULT; ret = -EFAULT;
buf += tape->stage_size; buf += tape->stage_size;
count -= tape->stage_size; count -= tape->stage_size;
...@@ -2617,8 +2615,7 @@ static ssize_t idetape_chrdev_write(struct file *file, const char __user *buf, ...@@ -2617,8 +2615,7 @@ static ssize_t idetape_chrdev_write(struct file *file, const char __user *buf,
} }
if (count) { if (count) {
actually_written += count; actually_written += count;
if (idetape_copy_stage_from_user(tape, tape->merge_stage, buf, if (idetape_copy_stage_from_user(tape, buf, count))
count))
ret = -EFAULT; ret = -EFAULT;
tape->merge_stage_size += count; tape->merge_stage_size += count;
} }
......
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