Skip to contentSkip to conversation

IB/srp: Introduce list_first_entry()

PATCH Superseded Bart Van Assche 2 participants 2 messages Aug 22, 2010 – Aug 25, 2010 1 message not in the archive

Subsystems (2)

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 5/5 IB/srp: Introduce list_first_entry()

Introduces the list_first_entry() macro in ib_srp, which makes the source code slightly more descriptive. The list_first_entry() macro itself was introduced in kernel 2.6.22.

---
 drivers/infiniband/ulp/srp/ib_srp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/infiniband/ulp/srp/ib_srp.c +1 -1
index eb31052..2b76a0b 100644
@@ -1157,7 +1157,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;
Signature · 5 lines
1.6.4.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

Acked-by
#2 lore raw
Quoted 6 lines · Bart Van Assche

Introduces the list_first_entry() macro in ib_srp, which makes the source code slightly more descriptive. The list_first_entry() macro itself was introduced in kernel 2.6.22.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html