Staging: hv: Get rid of the forward declaration for blkvsc_do_pending_reqs()
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 22 Apr 2011 21:13:35 +0000 (14:13 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 25 Apr 2011 23:20:47 +0000 (16:20 -0700)
Get rid of the forward declaration for blkvsc_do_pending_reqs() by moving
the code around.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/blkvsc_drv.c

index 0b5622ef094549a896fabe900b3b7d6fc346966b..5252948784e667417b49e34562ce0f8c8e09415a 100644 (file)
@@ -1140,10 +1140,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);
@@ -1470,28 +1491,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;