From patchwork Sun Oct 17 03:25:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Dillow X-Patchwork-Id: 259641 X-Patchwork-Delegate: dave@thedillows.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9H3pqZd015613 for ; Sun, 17 Oct 2010 03:51:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753686Ab0JQDvx (ORCPT ); Sat, 16 Oct 2010 23:51:53 -0400 Received: from amavis-smtp.knology.net ([75.76.199.6]:36559 "EHLO amavis-smtp.knology.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751710Ab0JQDvx (ORCPT ); Sat, 16 Oct 2010 23:51:53 -0400 Received: from localhost (amavis-smtp [127.0.0.1]) by amavis-smtp.knology.net (Postfix) with ESMTP id E23AC88AA7; Sat, 16 Oct 2010 23:25:24 -0400 (EDT) Received: from smtp12.knology.net ([75.76.199.9]) by localhost (amavis-smtp.knology.net [75.76.199.6]) (amavisd-new, port 10024) with LMTP id eDckpTrTH4NM; Sat, 16 Oct 2010 23:25:24 -0400 (EDT) Received: from shed.thedillows.org (unknown [207.98.218.89]) by smtp12.knology.net (Postfix) with ESMTP id A0AA55200058; Sat, 16 Oct 2010 23:25:02 -0400 (EDT) Received: from shed.thedillows.org (localhost.localdomain [127.0.0.1]) by shed.thedillows.org (8.14.4/8.14.4) with ESMTP id o9H3PQj4011762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 16 Oct 2010 23:25:26 -0400 Received: (from dad@localhost) by shed.thedillows.org (8.14.4/8.14.4/Submit) id o9H3PQ9S011761; Sat, 16 Oct 2010 23:25:26 -0400 X-Authentication-Warning: shed.thedillows.org: dad set sender to dave@thedillows.org using -f From: David Dillow To: rolandd@cisco.com Cc: linux-rdma@vger.kernel.org, bart.vanassche@gmail.com Subject: [PATCH 5/5] IB/srp: Introduce list_first_entry() Date: Sat, 16 Oct 2010 23:25:25 -0400 Message-Id: <1287285925-11710-6-git-send-email-dillowda@ornl.gov> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1287285925-11710-1-git-send-email-dillowda@ornl.gov> References: <1287285925-11710-1-git-send-email-dillowda@ornl.gov> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sun, 17 Oct 2010 03:51:54 +0000 (UTC) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 4df8275..9b4bc5a 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;