lkml.org 
[lkml]   [2008]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 09/22] ide-tape: remove idetape_increase_max_pipeline_stages()
    Date
    From
    This function was being used only at one place so fold it in there.

    Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
    ---
    drivers/ide/ide-tape.c | 36 ++++++++++++++++--------------------
    1 files changed, 16 insertions(+), 20 deletions(-)

    diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
    index b4944ef..ae2c76d 100644
    --- a/drivers/ide/ide-tape.c
    +++ b/drivers/ide/ide-tape.c
    @@ -771,25 +771,6 @@ static void idetape_activate_next_stage(ide_drive_t *drive)
    }

    /*
    - * idetape_increase_max_pipeline_stages is a part of the feedback
    - * loop which tries to find the optimum number of stages. In the
    - * feedback loop, we are starting from a minimum maximum number of
    - * stages, and if we sense that the pipeline is empty, we try to
    - * increase it, until we reach the user compile time memory limit.
    - */
    -static void idetape_increase_max_pipeline_stages (ide_drive_t *drive)
    -{
    - idetape_tape_t *tape = drive->driver_data;
    - int increase = (tape->max_pipeline - tape->min_pipeline) / 10;
    -
    - debug_log(DBG_PROCS, "Enter %s\n", __func__);
    -
    - tape->max_stages += max(increase, 1);
    - tape->max_stages = max(tape->max_stages, tape->min_pipeline);
    - tape->max_stages = min(tape->max_stages, tape->max_pipeline);
    -}
    -
    -/*
    * idetape_kfree_stage calls kfree to completely free a stage, along with
    * its related buffers.
    */
    @@ -937,7 +918,22 @@ static int idetape_end_request(ide_drive_t *drive, int uptodate, int nr_sects)
    (void)ide_do_drive_cmd(drive, tape->active_data_rq,
    ide_end);
    } else if (!error) {
    - idetape_increase_max_pipeline_stages(drive);
    + /*
    + * This is a part of the feedback loop which tries to
    + * find the optimum number of stages. We are starting
    + * from a minimum maximum number of stages, and if we
    + * sense that the pipeline is empty, we try to increase
    + * it, until we reach the user compile time memory
    + * limit.
    + */
    + int i = (tape->max_pipeline - tape->min_pipeline) / 10;
    +
    + tape->max_stages += max(i, 1);
    + tape->max_stages = max(tape->max_stages,
    + tape->min_pipeline);
    + tape->max_stages = min(tape->max_stages,
    + tape->max_pipeline);
    +
    }
    }
    ide_end_drive_cmd(drive, 0, 0);
    --
    1.5.3.7


    \
     
     \ /
      Last update: 2008-02-04 14:49    [W:0.026 / U:0.452 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site