diff options
author | Bart Van Assche <bvanassche@acm.org> | 2010-08-30 21:27:40 +0200 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-10-25 07:14:19 +0200 |
commit | 21c1a90769e680e7c1f49bae4c5804cf0c7bc814 (patch) | |
tree | 917996eb13d0ab93163f26e4824c0d7b2e1bec34 /drivers/infiniband/ulp | |
parent | IB/srp: Reduce number of BUSY conditions (diff) | |
download | linux-21c1a90769e680e7c1f49bae4c5804cf0c7bc814.tar.xz linux-21c1a90769e680e7c1f49bae4c5804cf0c7bc814.zip |
IB/srp: Use list_first_entry()
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>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 4df827591cad..9b4bc5ae5b10 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -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; |