Skip to content

Commit

Permalink
cciss: hoist tag masking out of loop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen M. Cameron authored and Jens Axboe committed Mar 12, 2011
1 parent 978eb51 commit 4a76504
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4a76504

Please sign in to comment.