lkml.org 
[lkml]   [2011]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 1/6] cciss: host tag masking out of loop
    From
    Date
    From: Stephen M. Cameron <scameron@beardog.cce.hp.com>

    In process_nonindexed_cmd, hoist figuring of masked tag out of loop since
    it is the same throughout.

    Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
    ---
    drivers/block/cciss.c | 4 +---
    1 files changed, 1 insertions(+), 3 deletions(-)

    diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
    index 9279272..bbf82e5 100644
    --- a/drivers/block/cciss.c
    +++ b/drivers/block/cciss.c
    @@ -3400,14 +3400,12 @@ static inline u32 process_indexed_cmd(ctlr_info_t *h, u32 raw_tag)
    /* process completion of a non-indexed command */
    static inline u32 process_nonindexed_cmd(ctlr_info_t *h, u32 raw_tag)
    {
    - u32 tag;
    CommandList_struct *c = NULL;
    __u32 busaddr_masked, tag_masked;

    - tag = cciss_tag_discard_error_bits(raw_tag);
    + tag_masked = cciss_tag_discard_error_bits(raw_tag);
    list_for_each_entry(c, &h->cmpQ, list) {
    busaddr_masked = cciss_tag_discard_error_bits(c->busaddr);
    - tag_masked = cciss_tag_discard_error_bits(tag);
    if (busaddr_masked == tag_masked) {
    finish_cmd(h, c, raw_tag);
    return next_command(h);


    \
     
     \ /
      Last update: 2011-02-22 21:17    [W:0.020 / U:0.200 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site