With sparse, the following error appears :
CHECK drivers/staging/rts5139/ms_mg.c
drivers/staging/rts5139/ms_mg.c:82:5: warning: symbol 'mg_set_tpc_para_sub' was not declared. Should it be static?
Rename function with correct prefix and move declaration to coherent internal header file.
Signed-off-by: Neil 'Superna' Armstrong <superna9999@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
#include "rts51x_scsi.h"
#include "rts51x_card.h"
#include "ms.h"
#include "rts51x_scsi.h"
#include "rts51x_card.h"
#include "ms.h"
static inline void ms_set_err_code(struct rts51x_chip *chip, u8 err_code)
{
static inline void ms_set_err_code(struct rts51x_chip *chip, u8 err_code)
{
-#ifdef SUPPORT_MAGIC_GATE
-int mg_set_tpc_para_sub(struct rts51x_chip *chip, int type, u8 mg_entry_num);
-#endif
-
static int reset_ms_pro(struct rts51x_chip *chip)
{
struct ms_info *ms_card = &(chip->ms_card);
static int reset_ms_pro(struct rts51x_chip *chip)
{
struct ms_info *ms_card = &(chip->ms_card);
#endif
#ifdef SUPPORT_MAGIC_GATE
#endif
#ifdef SUPPORT_MAGIC_GATE
- retval = mg_set_tpc_para_sub(chip, 0, 0);
+ retval = rts51x_mg_set_tpc_para_sub(chip, 0, 0);
if (retval != STATUS_SUCCESS)
TRACE_RET(chip, retval);
#endif
if (retval != STATUS_SUCCESS)
TRACE_RET(chip, retval);
#endif
-int mg_set_tpc_para_sub(struct rts51x_chip *chip, int type, u8 mg_entry_num)
+int rts51x_mg_set_tpc_para_sub(struct rts51x_chip *chip, int type, u8 mg_entry_num)
#include "rts51x_chip.h"
#include "ms.h"
#include "rts51x_chip.h"
#include "ms.h"
+int rts51x_mg_set_tpc_para_sub(struct rts51x_chip *chip, int type, u8 mg_entry_num);
int rts51x_mg_set_leaf_id(struct scsi_cmnd *srb, struct rts51x_chip *chip);
int rts51x_mg_get_local_EKB(struct scsi_cmnd *srb, struct rts51x_chip *chip);
int rts51x_mg_chg(struct scsi_cmnd *srb, struct rts51x_chip *chip);
int rts51x_mg_set_leaf_id(struct scsi_cmnd *srb, struct rts51x_chip *chip);
int rts51x_mg_get_local_EKB(struct scsi_cmnd *srb, struct rts51x_chip *chip);
int rts51x_mg_chg(struct scsi_cmnd *srb, struct rts51x_chip *chip);