Commit 21c1a907 authored by Bart Van Assche's avatar Bart Van Assche Committed by Roland Dreier

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: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarDavid Dillow <dillowda@ornl.gov>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 7ade400a
...@@ -1151,7 +1151,7 @@ static int srp_queuecommand(struct scsi_cmnd *scmnd, ...@@ -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, ib_dma_sync_single_for_cpu(dev, iu->dma, srp_max_iu_len,
DMA_TO_DEVICE); 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->scsi_done = done;
scmnd->result = 0; scmnd->result = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment