aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-05-06 10:27:00 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-05-06 10:27:00 -0400
commitedc83d47a9928281ecf6fb709753edb3c58ae7f1 (patch)
tree07f6c65a492ca04c67967142a0eb176e20bbf77f /drivers/block
parent8a4ec67bd5648beb09d7db988a75835b740e950d (diff)
cciss: fix compile issue
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>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/cciss.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index abe90c973540..8f4ef656a1af 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -2503,31 +2503,6 @@ static int deregister_disk(ctlr_info_t *h, int drv_index,
2503 return 0; 2503 return 0;
2504} 2504}
2505 2505
2506static int __devinit cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr,
2507 u8 reset_type)
2508{
2509 CommandList_struct *c;
2510 int return_status;
2511
2512 c = cmd_alloc(h);
2513 if (!c)
2514 return -ENOMEM;
2515 return_status = fill_cmd(h, c, CCISS_RESET_MSG, NULL, 0, 0,
2516 CTLR_LUNID, TYPE_MSG);
2517 c->Request.CDB[1] = reset_type; /* fill_cmd defaults to target reset */
2518 if (return_status != IO_OK) {
2519 cmd_special_free(h, c);
2520 return return_status;
2521 }
2522 c->waiting = NULL;
2523 enqueue_cmd_and_start_io(h, c);
2524 /* Don't wait for completion, the reset won't complete. Don't free
2525 * the command either. This is the last command we will send before
2526 * re-initializing everything, so it doesn't matter and won't leak.
2527 */
2528 return 0;
2529}
2530
2531static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff, 2506static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff,
2532 size_t size, __u8 page_code, unsigned char *scsi3addr, 2507 size_t size, __u8 page_code, unsigned char *scsi3addr,
2533 int cmd_type) 2508 int cmd_type)
@@ -2668,6 +2643,31 @@ static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff,
2668 return status; 2643 return status;
2669} 2644}
2670 2645
2646static int __devinit cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr,
2647 u8 reset_type)
2648{
2649 CommandList_struct *c;
2650 int return_status;
2651
2652 c = cmd_alloc(h);
2653 if (!c)
2654 return -ENOMEM;
2655 return_status = fill_cmd(h, c, CCISS_RESET_MSG, NULL, 0, 0,
2656 CTLR_LUNID, TYPE_MSG);
2657 c->Request.CDB[1] = reset_type; /* fill_cmd defaults to target reset */
2658 if (return_status != IO_OK) {
2659 cmd_special_free(h, c);
2660 return return_status;
2661 }
2662 c->waiting = NULL;
2663 enqueue_cmd_and_start_io(h, c);
2664 /* Don't wait for completion, the reset won't complete. Don't free
2665 * the command either. This is the last command we will send before
2666 * re-initializing everything, so it doesn't matter and won't leak.
2667 */
2668 return 0;
2669}
2670
2671static int check_target_status(ctlr_info_t *h, CommandList_struct *c) 2671static int check_target_status(ctlr_info_t *h, CommandList_struct *c)
2672{ 2672{
2673 switch (c->err_info->ScsiStatus) { 2673 switch (c->err_info->ScsiStatus) {