Skip to content

Commit

Permalink
IB/srp: Use list_first_entry()
Browse files Browse the repository at this point in the history
Use the list_first_entry() macro in ib_srp instead of open-coding the equivalent,
which makes the source code slightly more descriptive.  The list_first_entry()
macro itself was introduced in kernel 2.6.22.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: David Dillow <dillowda@ornl.gov>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Bart Van Assche authored and Roland Dreier committed Oct 25, 2010
1 parent 7ade400 commit 21c1a90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ static int srp_queuecommand(struct scsi_cmnd *scmnd,
ib_dma_sync_single_for_cpu(dev, iu->dma, srp_max_iu_len,
DMA_TO_DEVICE);

req = list_entry(target->free_reqs.next, struct srp_request, list);
req = list_first_entry(&target->free_reqs, struct srp_request, list);

scmnd->scsi_done = done;
scmnd->result = 0;
Expand Down

0 comments on commit 21c1a90

Please sign in to comment.