]> git.karo-electronics.de Git - linux-beck.git/commitdiff
cciss: hoist tag masking out of loop
authorStephen M. Cameron <scameron@beardog.cce.hp.com>
Sat, 12 Mar 2011 09:02:11 +0000 (10:02 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 12 Mar 2011 09:02:11 +0000 (10:02 +0100)
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>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/block/cciss.c

index eeed7aeb0b83accea60232cd62b2bd0680a7ae26..0a296c1eff4ff97dd34c16cf194964514541bc26 100644 (file)
@@ -3433,14 +3433,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);