]> Pileus Git - ~andy/linux/commitdiff
cciss: fix compile issue
authorJens Axboe <jaxboe@fusionio.com>
Fri, 6 May 2011 14:27:00 +0000 (08:27 -0600)
committerJens Axboe <jaxboe@fusionio.com>
Fri, 6 May 2011 14:27:00 +0000 (08:27 -0600)
drivers/block/cciss.c: In function ‘cciss_send_reset’:
drivers/block/cciss.c:2515:2: error: implicit declaration of function ‘fill_cmd’
drivers/block/cciss.c: At top level:
drivers/block/cciss.c:2531:12: error: conflicting types for ‘fill_cmd’
drivers/block/cciss.c:2534:1: note: an argument type that has a default promotion can’t match an empty parameter name list declaration
drivers/block/cciss.c:2515:18: note: previous implicit declaration of ‘fill_cmd’ was here
make[1]: *** [drivers/block/cciss.o] Error 1
make: *** [drivers/block/cciss.o] Error 2

Move fill_cmd() to above where it is first used.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/block/cciss.c

index abe90c973540e76c38b88ef673c23e9c584899d4..8f4ef656a1af4ca435ff3ecc5e0d6079e6a1e34d 100644 (file)
@@ -2503,31 +2503,6 @@ static int deregister_disk(ctlr_info_t *h, int drv_index,
        return 0;
 }
 
-static int __devinit cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr,
-       u8 reset_type)
-{
-       CommandList_struct *c;
-       int return_status;
-
-       c = cmd_alloc(h);
-       if (!c)
-               return -ENOMEM;
-       return_status = fill_cmd(h, c, CCISS_RESET_MSG, NULL, 0, 0,
-               CTLR_LUNID, TYPE_MSG);
-       c->Request.CDB[1] = reset_type; /* fill_cmd defaults to target reset */
-       if (return_status != IO_OK) {
-               cmd_special_free(h, c);
-               return return_status;
-       }
-       c->waiting = NULL;
-       enqueue_cmd_and_start_io(h, c);
-       /* Don't wait for completion, the reset won't complete.  Don't free
-        * the command either.  This is the last command we will send before
-        * re-initializing everything, so it doesn't matter and won't leak.
-        */
-       return 0;
-}
-
 static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff,
                size_t size, __u8 page_code, unsigned char *scsi3addr,
                int cmd_type)
@@ -2668,6 +2643,31 @@ static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff,
        return status;
 }
 
+static int __devinit cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr,
+       u8 reset_type)
+{
+       CommandList_struct *c;
+       int return_status;
+
+       c = cmd_alloc(h);
+       if (!c)
+               return -ENOMEM;
+       return_status = fill_cmd(h, c, CCISS_RESET_MSG, NULL, 0, 0,
+               CTLR_LUNID, TYPE_MSG);
+       c->Request.CDB[1] = reset_type; /* fill_cmd defaults to target reset */
+       if (return_status != IO_OK) {
+               cmd_special_free(h, c);
+               return return_status;
+       }
+       c->waiting = NULL;
+       enqueue_cmd_and_start_io(h, c);
+       /* Don't wait for completion, the reset won't complete.  Don't free
+        * the command either.  This is the last command we will send before
+        * re-initializing everything, so it doesn't matter and won't leak.
+        */
+       return 0;
+}
+
 static int check_target_status(ctlr_info_t *h, CommandList_struct *c)
 {
        switch (c->err_info->ScsiStatus) {