scsi: hisi_sas: Remove some unused function arguments

Some function arguments are unused, so remove them.

Also move the timeout print in for wait_cmds_complete_timeout_vX_hw()
callsites into that same function.

Link: https://lore.kernel.org/r/1567774537-20003-11-git-send-email-john.garry@huawei.com
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Luo Jiaxing 2019-09-06 20:55:34 +08:00 committed by Martin K. Petersen
parent 27f22723c3
commit 4bc058097a
4 changed files with 17 additions and 20 deletions

View File

@ -306,8 +306,8 @@ struct hisi_sas_hw {
u32 (*get_phys_state)(struct hisi_hba *hisi_hba); u32 (*get_phys_state)(struct hisi_hba *hisi_hba);
int (*write_gpio)(struct hisi_hba *hisi_hba, u8 reg_type, int (*write_gpio)(struct hisi_hba *hisi_hba, u8 reg_type,
u8 reg_index, u8 reg_count, u8 *write_data); u8 reg_index, u8 reg_count, u8 *write_data);
int (*wait_cmds_complete_timeout)(struct hisi_hba *hisi_hba, void (*wait_cmds_complete_timeout)(struct hisi_hba *hisi_hba,
int delay_ms, int timeout_ms); int delay_ms, int timeout_ms);
void (*snapshot_prepare)(struct hisi_hba *hisi_hba); void (*snapshot_prepare)(struct hisi_hba *hisi_hba);
void (*snapshot_restore)(struct hisi_hba *hisi_hba); void (*snapshot_restore)(struct hisi_hba *hisi_hba);
void (*read_iost_itct_cache)(struct hisi_hba *hisi_hba, void (*read_iost_itct_cache)(struct hisi_hba *hisi_hba,

View File

@ -1391,8 +1391,7 @@ static void hisi_sas_refresh_port_id(struct hisi_hba *hisi_hba)
} }
} }
static void hisi_sas_rescan_topology(struct hisi_hba *hisi_hba, u32 old_state, static void hisi_sas_rescan_topology(struct hisi_hba *hisi_hba, u32 state)
u32 state)
{ {
struct sas_ha_struct *sas_ha = &hisi_hba->sha; struct sas_ha_struct *sas_ha = &hisi_hba->sha;
struct asd_sas_port *_sas_port = NULL; struct asd_sas_port *_sas_port = NULL;
@ -1553,7 +1552,7 @@ void hisi_sas_controller_reset_done(struct hisi_hba *hisi_hba)
clear_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags); clear_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags);
state = hisi_hba->hw->get_phys_state(hisi_hba); state = hisi_hba->hw->get_phys_state(hisi_hba);
hisi_sas_rescan_topology(hisi_hba, hisi_hba->phy_state, state); hisi_sas_rescan_topology(hisi_hba, state);
} }
EXPORT_SYMBOL_GPL(hisi_sas_controller_reset_done); EXPORT_SYMBOL_GPL(hisi_sas_controller_reset_done);

View File

@ -3498,8 +3498,8 @@ static int write_gpio_v2_hw(struct hisi_hba *hisi_hba, u8 reg_type,
return 0; return 0;
} }
static int wait_cmds_complete_timeout_v2_hw(struct hisi_hba *hisi_hba, static void wait_cmds_complete_timeout_v2_hw(struct hisi_hba *hisi_hba,
int delay_ms, int timeout_ms) int delay_ms, int timeout_ms)
{ {
struct device *dev = hisi_hba->dev; struct device *dev = hisi_hba->dev;
int entries, entries_old = 0, time; int entries, entries_old = 0, time;
@ -3513,12 +3513,13 @@ static int wait_cmds_complete_timeout_v2_hw(struct hisi_hba *hisi_hba,
msleep(delay_ms); msleep(delay_ms);
} }
if (time >= timeout_ms) if (time >= timeout_ms) {
return -ETIMEDOUT; dev_dbg(dev, "Wait commands complete timeout!\n");
return;
}
dev_dbg(dev, "wait commands complete %dms\n", time); dev_dbg(dev, "wait commands complete %dms\n", time);
return 0;
} }
static struct device_attribute *host_attrs_v2_hw[] = { static struct device_attribute *host_attrs_v2_hw[] = {

View File

@ -2576,8 +2576,8 @@ static int write_gpio_v3_hw(struct hisi_hba *hisi_hba, u8 reg_type,
return 0; return 0;
} }
static int wait_cmds_complete_timeout_v3_hw(struct hisi_hba *hisi_hba, static void wait_cmds_complete_timeout_v3_hw(struct hisi_hba *hisi_hba,
int delay_ms, int timeout_ms) int delay_ms, int timeout_ms)
{ {
struct device *dev = hisi_hba->dev; struct device *dev = hisi_hba->dev;
int entries, entries_old = 0, time; int entries, entries_old = 0, time;
@ -2591,12 +2591,12 @@ static int wait_cmds_complete_timeout_v3_hw(struct hisi_hba *hisi_hba,
msleep(delay_ms); msleep(delay_ms);
} }
if (time >= timeout_ms) if (time >= timeout_ms) {
return -ETIMEDOUT; dev_dbg(dev, "Wait commands complete timeout!\n");
return;
}
dev_dbg(dev, "wait commands complete %dms\n", time); dev_dbg(dev, "wait commands complete %dms\n", time);
return 0;
} }
static ssize_t intr_conv_v3_hw_show(struct device *dev, static ssize_t intr_conv_v3_hw_show(struct device *dev,
@ -2877,14 +2877,11 @@ static const struct hisi_sas_debugfs_reg debugfs_ras_reg = {
static void debugfs_snapshot_prepare_v3_hw(struct hisi_hba *hisi_hba) static void debugfs_snapshot_prepare_v3_hw(struct hisi_hba *hisi_hba)
{ {
struct device *dev = hisi_hba->dev;
set_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags); set_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags);
hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, 0); hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, 0);
if (wait_cmds_complete_timeout_v3_hw(hisi_hba, 100, 5000) == -ETIMEDOUT) wait_cmds_complete_timeout_v3_hw(hisi_hba, 100, 5000);
dev_dbg(dev, "Wait commands complete timeout!\n");
hisi_sas_kill_tasklets(hisi_hba); hisi_sas_kill_tasklets(hisi_hba);
} }