[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1301331653-26265-18-git-send-email-kys@microsoft.com>
Date: Mon, 28 Mar 2011 10:00:49 -0700
From: "K. Y. Srinivasan" <kys@...rosoft.com>
To: gregkh@...e.de, linux-kernel@...r.kernel.org,
devel@...uxdriverproject.org, virtualization@...ts.osdl.org
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Abhishek Kane <v-abkane@...rosoft.com>,
Hank Janssen <hjanssen@...rosoft.com>
Subject: [PATCH 18/22] Staging: hv: Get rid of the forward declaration for blkvsc_do_pending_reqs()
Get rid of the forward declaration for blkvsc_do_pending_reqs() by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
Signed-off-by: Abhishek Kane <v-abkane@...rosoft.com>
Signed-off-by: Hank Janssen <hjanssen@...rosoft.com>
---
drivers/staging/hv/blkvsc_drv.c | 45 +++++++++++++++++++--------------------
1 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 01f6f84..535f315 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -1145,10 +1145,31 @@ static int blkvsc_do_request(struct block_device_context *blkdev,
return pending;
}
+static int blkvsc_do_pending_reqs(struct block_device_context *blkdev)
+{
+ struct blkvsc_request *pend_req, *tmp;
+ int ret = 0;
+
+ /* Flush the pending list first */
+ list_for_each_entry_safe(pend_req, tmp, &blkdev->pending_list,
+ pend_entry) {
+ DPRINT_DBG(BLKVSC_DRV, "working off pending_list - %p\n",
+ pend_req);
+
+ ret = blkvsc_submit_request(pend_req,
+ blkvsc_request_completion);
+ if (ret != 0)
+ break;
+ else
+ list_del(&pend_req->pend_entry);
+ }
+
+ return ret;
+}
+
/* Static decl */
static int blkvsc_probe(struct device *dev);
static void blkvsc_request(struct request_queue *queue);
-static int blkvsc_do_pending_reqs(struct block_device_context *blkdev);
static int blkvsc_ringbuffer_size = BLKVSC_RING_BUFFER_SIZE;
module_param(blkvsc_ringbuffer_size, int, S_IRUGO);
@@ -1475,28 +1496,6 @@ static void blkvsc_request_completion(struct hv_storvsc_request *request)
spin_unlock_irqrestore(&blkdev->lock, flags);
}
-static int blkvsc_do_pending_reqs(struct block_device_context *blkdev)
-{
- struct blkvsc_request *pend_req, *tmp;
- int ret = 0;
-
- /* Flush the pending list first */
- list_for_each_entry_safe(pend_req, tmp, &blkdev->pending_list,
- pend_entry) {
- DPRINT_DBG(BLKVSC_DRV, "working off pending_list - %p\n",
- pend_req);
-
- ret = blkvsc_submit_request(pend_req,
- blkvsc_request_completion);
- if (ret != 0)
- break;
- else
- list_del(&pend_req->pend_entry);
- }
-
- return ret;
-}
-
static void blkvsc_request(struct request_queue *queue)
{
struct block_device_context *blkdev = NULL;
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists