[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200803021936.12741.bzolnier@gmail.com>
Date: Sun, 2 Mar 2008 19:36:12 +0100
From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To: Borislav Petkov <petkovbb@...glemail.com>
Cc: linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
Borislav Petkov <petkovbb@...il.com>
Subject: Re: [PATCH 03/24] ide-tape: remove pipeline-specific code from idetape_add_chrdev_read_request
On Saturday 01 March 2008, Borislav Petkov wrote:
> We fall back to non-pipelined operation through idetape_queue_rw_tail with cmd
> set to REQ_IDETAPE_READ. Also, remove idetape_switch_buffers() since it becomes
> unused.
>
> Signed-off-by: Borislav Petkov <petkovbb@...il.com>
> ---
> drivers/ide/ide-tape.c | 46 +---------------------------------------------
> 1 files changed, 1 insertions(+), 45 deletions(-)
>
> diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
> index abf3efa..e919d41 100644
> --- a/drivers/ide/ide-tape.c
> +++ b/drivers/ide/ide-tape.c
> @@ -1776,16 +1776,6 @@ static void idetape_init_merge_stage(idetape_tape_t *tape)
> }
> }
>
> -static void idetape_switch_buffers(idetape_tape_t *tape, idetape_stage_t *stage)
> -{
> - struct idetape_bh *tmp;
> -
> - tmp = stage->bh;
> - stage->bh = tape->merge_stage->bh;
> - tape->merge_stage->bh = tmp;
> - idetape_init_merge_stage(tape);
> -}
> -
> /* Add a new stage at the end of the pipeline. */
> static void idetape_add_stage_tail(ide_drive_t *drive, idetape_stage_t *stage)
> {
> @@ -2403,9 +2393,6 @@ static int idetape_init_read(ide_drive_t *drive, int max_stages)
> static int idetape_add_chrdev_read_request(ide_drive_t *drive, int blocks)
> {
> idetape_tape_t *tape = drive->driver_data;
> - unsigned long flags;
> - struct request *rq_ptr;
> - int bytes_read;
>
> debug_log(DBG_PROCS, "Enter %s, %d blocks\n", __func__, blocks);
>
> @@ -2413,39 +2400,8 @@ static int idetape_add_chrdev_read_request(ide_drive_t *drive, int blocks)
> if (test_bit(IDETAPE_FLAG_FILEMARK, &tape->flags))
> return 0;
>
> - /* Wait for the next block to reach the head of the pipeline. */
> - idetape_init_read(drive, tape->max_stages);
Can it be simply removed? Why?
> - if (tape->first_stage == NULL) {
> - if (test_bit(IDETAPE_FLAG_PIPELINE_ERR, &tape->flags))
> - return 0;
> - return idetape_queue_rw_tail(drive, REQ_IDETAPE_READ, blocks,
> + return idetape_queue_rw_tail(drive, REQ_IDETAPE_READ, blocks,
> tape->merge_stage->bh);
Looking at the driver code tape->first_stage is not always NULL,
seems like ide_tape_add_stage_tail() should vanish first?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists