1
0
Fork 0

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>
hifive-unleashed-5.1
Bart Van Assche 2010-08-30 19:27:40 +00:00 committed by Roland Dreier
parent 7ade400aba
commit 21c1a90769
1 changed files with 1 additions and 1 deletions

View File

@ -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;