Commit 4dc74b2e authored by Joe Perches's avatar Joe Perches Committed by Martin K. Petersen

scsi: mpt3sas: Convert mlsleading uses of pr_<level> with MPT3SAS_FMT

These have misordered uses of __func__ and ioc->name that could mismatch
MPT3SAS_FMT and "%s: ".

Convert them to ioc_<level>.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarSuganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 919d8a3f
...@@ -2627,15 +2627,13 @@ mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, u64 lun, ...@@ -2627,15 +2627,13 @@ mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, u64 lun,
lockdep_assert_held(&ioc->tm_cmds.mutex); lockdep_assert_held(&ioc->tm_cmds.mutex);
if (ioc->tm_cmds.status != MPT3_CMD_NOT_USED) { if (ioc->tm_cmds.status != MPT3_CMD_NOT_USED) {
pr_info(MPT3SAS_FMT "%s: tm_cmd busy!!!\n", ioc_info(ioc, "%s: tm_cmd busy!!!\n", __func__);
__func__, ioc->name);
return FAILED; return FAILED;
} }
if (ioc->shost_recovery || ioc->remove_host || if (ioc->shost_recovery || ioc->remove_host ||
ioc->pci_error_recovery) { ioc->pci_error_recovery) {
pr_info(MPT3SAS_FMT "%s: host reset in progress!\n", ioc_info(ioc, "%s: host reset in progress!\n", __func__);
__func__, ioc->name);
return FAILED; return FAILED;
} }
...@@ -3550,18 +3548,16 @@ _scsih_tm_tr_send(struct MPT3SAS_ADAPTER *ioc, u16 handle) ...@@ -3550,18 +3548,16 @@ _scsih_tm_tr_send(struct MPT3SAS_ADAPTER *ioc, u16 handle)
u8 tr_method = 0; u8 tr_method = 0;
if (ioc->pci_error_recovery) { if (ioc->pci_error_recovery) {
dewtprintk(ioc, pr_info(MPT3SAS_FMT dewtprintk(ioc,
"%s: host in pci error recovery: handle(0x%04x)\n", ioc_info(ioc, "%s: host in pci error recovery: handle(0x%04x)\n",
__func__, ioc->name, __func__, handle));
handle));
return; return;
} }
ioc_state = mpt3sas_base_get_iocstate(ioc, 1); ioc_state = mpt3sas_base_get_iocstate(ioc, 1);
if (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { if (ioc_state != MPI2_IOC_STATE_OPERATIONAL) {
dewtprintk(ioc, pr_info(MPT3SAS_FMT dewtprintk(ioc,
"%s: host is not operational: handle(0x%04x)\n", ioc_info(ioc, "%s: host is not operational: handle(0x%04x)\n",
__func__, ioc->name, __func__, handle));
handle));
return; return;
} }
...@@ -3811,9 +3807,9 @@ _scsih_tm_tr_volume_send(struct MPT3SAS_ADAPTER *ioc, u16 handle) ...@@ -3811,9 +3807,9 @@ _scsih_tm_tr_volume_send(struct MPT3SAS_ADAPTER *ioc, u16 handle)
struct _tr_list *delayed_tr; struct _tr_list *delayed_tr;
if (ioc->pci_error_recovery) { if (ioc->pci_error_recovery) {
dewtprintk(ioc, pr_info(MPT3SAS_FMT dewtprintk(ioc,
"%s: host reset in progress!\n", ioc_info(ioc, "%s: host reset in progress!\n",
__func__, ioc->name)); __func__));
return; return;
} }
...@@ -3863,9 +3859,9 @@ _scsih_tm_volume_tr_complete(struct MPT3SAS_ADAPTER *ioc, u16 smid, ...@@ -3863,9 +3859,9 @@ _scsih_tm_volume_tr_complete(struct MPT3SAS_ADAPTER *ioc, u16 smid,
mpt3sas_base_get_reply_virt_addr(ioc, reply); mpt3sas_base_get_reply_virt_addr(ioc, reply);
if (ioc->shost_recovery || ioc->pci_error_recovery) { if (ioc->shost_recovery || ioc->pci_error_recovery) {
dewtprintk(ioc, pr_info(MPT3SAS_FMT dewtprintk(ioc,
"%s: host reset in progress!\n", ioc_info(ioc, "%s: host reset in progress!\n",
__func__, ioc->name)); __func__));
return 1; return 1;
} }
if (unlikely(!mpi_reply)) { if (unlikely(!mpi_reply)) {
...@@ -3950,21 +3946,21 @@ _scsih_issue_delayed_sas_io_unit_ctrl(struct MPT3SAS_ADAPTER *ioc, ...@@ -3950,21 +3946,21 @@ _scsih_issue_delayed_sas_io_unit_ctrl(struct MPT3SAS_ADAPTER *ioc,
unsigned long flags; unsigned long flags;
if (ioc->remove_host) { if (ioc->remove_host) {
dewtprintk(ioc, pr_info(MPT3SAS_FMT dewtprintk(ioc,
"%s: host has been removed\n", ioc_info(ioc, "%s: host has been removed\n",
__func__, ioc->name)); __func__));
return; return;
} else if (ioc->pci_error_recovery) { } else if (ioc->pci_error_recovery) {
dewtprintk(ioc, pr_info(MPT3SAS_FMT dewtprintk(ioc,
"%s: host in pci error recovery\n", ioc_info(ioc, "%s: host in pci error recovery\n",
__func__, ioc->name)); __func__));
return; return;
} }
ioc_state = mpt3sas_base_get_iocstate(ioc, 1); ioc_state = mpt3sas_base_get_iocstate(ioc, 1);
if (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { if (ioc_state != MPI2_IOC_STATE_OPERATIONAL) {
dewtprintk(ioc, pr_info(MPT3SAS_FMT dewtprintk(ioc,
"%s: host is not operational\n", ioc_info(ioc, "%s: host is not operational\n",
__func__, ioc->name)); __func__));
return; return;
} }
......
...@@ -146,8 +146,7 @@ _transport_set_identify(struct MPT3SAS_ADAPTER *ioc, u16 handle, ...@@ -146,8 +146,7 @@ _transport_set_identify(struct MPT3SAS_ADAPTER *ioc, u16 handle,
u32 ioc_status; u32 ioc_status;
if (ioc->shost_recovery || ioc->pci_error_recovery) { if (ioc->shost_recovery || ioc->pci_error_recovery) {
pr_info(MPT3SAS_FMT "%s: host reset in progress!\n", ioc_info(ioc, "%s: host reset in progress!\n", __func__);
__func__, ioc->name);
return -EFAULT; return -EFAULT;
} }
...@@ -308,8 +307,7 @@ _transport_expander_report_manufacture(struct MPT3SAS_ADAPTER *ioc, ...@@ -308,8 +307,7 @@ _transport_expander_report_manufacture(struct MPT3SAS_ADAPTER *ioc,
u16 wait_state_count; u16 wait_state_count;
if (ioc->shost_recovery || ioc->pci_error_recovery) { if (ioc->shost_recovery || ioc->pci_error_recovery) {
pr_info(MPT3SAS_FMT "%s: host reset in progress!\n", ioc_info(ioc, "%s: host reset in progress!\n", __func__);
__func__, ioc->name);
return -EFAULT; return -EFAULT;
} }
...@@ -1088,8 +1086,7 @@ _transport_get_expander_phy_error_log(struct MPT3SAS_ADAPTER *ioc, ...@@ -1088,8 +1086,7 @@ _transport_get_expander_phy_error_log(struct MPT3SAS_ADAPTER *ioc,
u16 wait_state_count; u16 wait_state_count;
if (ioc->shost_recovery || ioc->pci_error_recovery) { if (ioc->shost_recovery || ioc->pci_error_recovery) {
pr_info(MPT3SAS_FMT "%s: host reset in progress!\n", ioc_info(ioc, "%s: host reset in progress!\n", __func__);
__func__, ioc->name);
return -EFAULT; return -EFAULT;
} }
...@@ -1393,8 +1390,7 @@ _transport_expander_phy_control(struct MPT3SAS_ADAPTER *ioc, ...@@ -1393,8 +1390,7 @@ _transport_expander_phy_control(struct MPT3SAS_ADAPTER *ioc,
u16 wait_state_count; u16 wait_state_count;
if (ioc->shost_recovery || ioc->pci_error_recovery) { if (ioc->shost_recovery || ioc->pci_error_recovery) {
pr_info(MPT3SAS_FMT "%s: host reset in progress!\n", ioc_info(ioc, "%s: host reset in progress!\n", __func__);
__func__, ioc->name);
return -EFAULT; return -EFAULT;
} }
...@@ -1894,8 +1890,7 @@ _transport_smp_handler(struct bsg_job *job, struct Scsi_Host *shost, ...@@ -1894,8 +1890,7 @@ _transport_smp_handler(struct bsg_job *job, struct Scsi_Host *shost,
unsigned int reslen = 0; unsigned int reslen = 0;
if (ioc->shost_recovery || ioc->pci_error_recovery) { if (ioc->shost_recovery || ioc->pci_error_recovery) {
pr_info(MPT3SAS_FMT "%s: host reset in progress!\n", ioc_info(ioc, "%s: host reset in progress!\n", __func__);
__func__, ioc->name);
rc = -EFAULT; rc = -EFAULT;
goto job_done; goto job_done;
} }
...@@ -1975,8 +1970,7 @@ _transport_smp_handler(struct bsg_job *job, struct Scsi_Host *shost, ...@@ -1975,8 +1970,7 @@ _transport_smp_handler(struct bsg_job *job, struct Scsi_Host *shost,
wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ);
if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) {
pr_err(MPT3SAS_FMT "%s : timeout\n", ioc_err(ioc, "%s: timeout\n", __func__);
__func__, ioc->name);
_debug_dump_mf(mpi_request, _debug_dump_mf(mpi_request,
sizeof(Mpi2SmpPassthroughRequest_t)/4); sizeof(Mpi2SmpPassthroughRequest_t)/4);
if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) { if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment