lkml.org 
[lkml]   [2008]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 04/24] ide-tape: remove pipeline-specific code from idetape_chrdev_write
Date
On Saturday 01 March 2008, Borislav Petkov wrote:
> Also, remove unused stage-parameter from idetape_copy_stage_from_user()

Changes like this one are the best to put into separate patches
at the very beginning of the patch series.

> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> ---
> drivers/ide/ide-tape.c | 15 ++++-----------
> 1 files changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
> index e919d41..4a064c1 100644
> --- a/drivers/ide/ide-tape.c
> +++ b/drivers/ide/ide-tape.c
> @@ -1700,7 +1700,7 @@ static idetape_stage_t *idetape_kmalloc_stage(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;
> int count;
> @@ -2696,8 +2696,6 @@ static ssize_t idetape_chrdev_write(struct file *file, const char __user *buf,
>
> /* Initialize write operation */
> if (tape->chrdev_dir != IDETAPE_DIR_WRITE) {
> - if (tape->chrdev_dir == IDETAPE_DIR_READ)
> - idetape_discard_read_pipeline(drive, 1);

Why this is OK thing to do?

Are you sure that there are no hidden side-effects?

> if (tape->merge_stage || tape->merge_stage_size) {
> printk(KERN_ERR "ide-tape: merge_stage_size "
> "should be 0 now\n");
> @@ -2729,8 +2727,6 @@ static ssize_t idetape_chrdev_write(struct file *file, const char __user *buf,
> }
> if (count == 0)
> return (0);
> - if (tape->restart_speed_control_req)
> - idetape_restart_speed_control(drive);

ditto

tape->restart_speed_control_req can still be non-zero.


\
 
 \ /
  Last update: 2008-03-02 20:07    [W:0.276 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site