mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-06 20:53:54 +08:00
cciss: hoist tag masking out of loop
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>
This commit is contained in:
parent
978eb516a4
commit
4a76504655
@ -3433,14 +3433,12 @@ static inline u32 process_indexed_cmd(ctlr_info_t *h, u32 raw_tag)
|
|||||||
/* process completion of a non-indexed command */
|
/* process completion of a non-indexed command */
|
||||||
static inline u32 process_nonindexed_cmd(ctlr_info_t *h, u32 raw_tag)
|
static inline u32 process_nonindexed_cmd(ctlr_info_t *h, u32 raw_tag)
|
||||||
{
|
{
|
||||||
u32 tag;
|
|
||||||
CommandList_struct *c = NULL;
|
CommandList_struct *c = NULL;
|
||||||
__u32 busaddr_masked, tag_masked;
|
__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) {
|
list_for_each_entry(c, &h->cmpQ, list) {
|
||||||
busaddr_masked = cciss_tag_discard_error_bits(c->busaddr);
|
busaddr_masked = cciss_tag_discard_error_bits(c->busaddr);
|
||||||
tag_masked = cciss_tag_discard_error_bits(tag);
|
|
||||||
if (busaddr_masked == tag_masked) {
|
if (busaddr_masked == tag_masked) {
|
||||||
finish_cmd(h, c, raw_tag);
|
finish_cmd(h, c, raw_tag);
|
||||||
return next_command(h);
|
return next_command(h);
|
||||||
|
Loading…
Reference in New Issue
Block a user