[PATCH 28/55] scsi: Move prototype declaration to appropriate header file megaraid/megaraid_sas.h from megaraid/megaraid_sas_fusion.c

From: Rashika Kheria
Date: Sat Mar 29 2014 - 14:15:26 EST


Move prototype declarations of function to header file
scsi/megaraid/megaraid_sas.h from megaraid/megaraid_sas_fusion.c because
they are used by more than one file.

This eliminates the following warning in megaraid/megaraid_sas_fusion.c:
drivers/scsi/megaraid/megaraid_sas_base.c:192:21: warning: no previous prototype for âmegasas_get_cmdâ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:218:1: warning: no previous prototype for âmegasas_return_cmdâ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:878:1: warning: no previous prototype for âmegasas_issue_polledâ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:1364:12: warning: no previous prototype for âmegasas_is_ldioâ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:1639:6: warning: no previous prototype for âmegaraid_sas_kill_hbaâ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:1659:1: warning: no previous prototype for âmegasas_check_and_restore_queue_depthâ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:3030:6: warning: no previous prototype for âmegasas_free_cmdsâ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:3066:5: warning: no previous prototype for âmegasas_alloc_cmdsâ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@xxxxxxxxx>
Reviewed-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
---
drivers/scsi/megaraid/megaraid_sas.h | 14 ++++++++++++++
drivers/scsi/megaraid/megaraid_sas_fusion.c | 13 -------------
2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 34452ea..3b0afb4 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -1723,6 +1723,20 @@ struct megasas_mgmt_info {
int max_index;
};

+struct megasas_cmd *megasas_get_cmd(struct megasas_instance
+ *instance);
+void
+megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd);
+int
+megasas_issue_polled(struct megasas_instance *instance,
+ struct megasas_cmd *cmd);
+int megasas_is_ldio(struct scsi_cmnd *cmd);
+void megaraid_sas_kill_hba(struct megasas_instance *instance);
+void
+megasas_check_and_restore_queue_depth(struct megasas_instance *instance);
+void megasas_free_cmds(struct megasas_instance *instance);
+int megasas_alloc_cmds(struct megasas_instance *instance);
+
u8
MR_BuildRaidContext(struct megasas_instance *instance,
struct IO_REQUEST_INFO *io_info,
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index f655592..2806d6d 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -54,31 +54,18 @@
#include "megaraid_sas_fusion.h"
#include "megaraid_sas.h"

-extern void megasas_free_cmds(struct megasas_instance *instance);
-extern struct megasas_cmd *megasas_get_cmd(struct megasas_instance
- *instance);
extern void
megasas_complete_cmd(struct megasas_instance *instance,
struct megasas_cmd *cmd, u8 alt_status);
-int megasas_is_ldio(struct scsi_cmnd *cmd);
int
wait_and_poll(struct megasas_instance *instance, struct megasas_cmd *cmd);

-void
-megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd);
-int megasas_alloc_cmds(struct megasas_instance *instance);
int
megasas_clear_intr_fusion(struct megasas_register_set __iomem *regs);
-int
-megasas_issue_polled(struct megasas_instance *instance,
- struct megasas_cmd *cmd);
-void
-megasas_check_and_restore_queue_depth(struct megasas_instance *instance);

u16 get_updated_dev_handle(struct LD_LOAD_BALANCE_INFO *lbInfo,
struct IO_REQUEST_INFO *in_info);
int megasas_transition_to_ready(struct megasas_instance *instance, int ocr);
-void megaraid_sas_kill_hba(struct megasas_instance *instance);

extern u32 megasas_dbg_lvl;
extern int resetwaittime;
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/