Skip to content

Commit 73eba2b

Browse files
Subhash Jadavanimartinkpetersen
authored andcommitted
scsi: ufs: fix arguments order some trace calls
Colin Ian King reported that with commit 7ff5ab4 ("scsi: ufs: add tracing support") static analysis is reporting that we may have swapped arguments on calls to: trace_ufshcd_runtime_resume, trace_ufshcd_runtime_suspend, trace_ufshcd_system_suspend, trace_ufshcd_system_resume, and trace_ufshcd_init Where: hba->uic_link_state is passed to dev_state hba->curr_dev_pwr_mode is passed to link_state This wasn't intentional so it's a bug. This change fixed this bug. Reported-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> Acked-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 2e48e34 commit 73eba2b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎drivers/scsi/ufs/ufshcd.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5803,7 +5803,7 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
58035803

58045804
trace_ufshcd_init(dev_name(hba->dev), ret,
58055805
ktime_to_us(ktime_sub(ktime_get(), start)),
5806-
hba->uic_link_state, hba->curr_dev_pwr_mode);
5806+
hba->curr_dev_pwr_mode, hba->uic_link_state);
58075807
return ret;
58085808
}
58095809

@@ -6817,7 +6817,7 @@ int ufshcd_system_suspend(struct ufs_hba *hba)
68176817
out:
68186818
trace_ufshcd_system_suspend(dev_name(hba->dev), ret,
68196819
ktime_to_us(ktime_sub(ktime_get(), start)),
6820-
hba->uic_link_state, hba->curr_dev_pwr_mode);
6820+
hba->curr_dev_pwr_mode, hba->uic_link_state);
68216821
if (!ret)
68226822
hba->is_sys_suspended = true;
68236823
return ret;
@@ -6850,7 +6850,7 @@ int ufshcd_system_resume(struct ufs_hba *hba)
68506850
out:
68516851
trace_ufshcd_system_resume(dev_name(hba->dev), ret,
68526852
ktime_to_us(ktime_sub(ktime_get(), start)),
6853-
hba->uic_link_state, hba->curr_dev_pwr_mode);
6853+
hba->curr_dev_pwr_mode, hba->uic_link_state);
68546854
return ret;
68556855
}
68566856
EXPORT_SYMBOL(ufshcd_system_resume);
@@ -6878,7 +6878,7 @@ int ufshcd_runtime_suspend(struct ufs_hba *hba)
68786878
out:
68796879
trace_ufshcd_runtime_suspend(dev_name(hba->dev), ret,
68806880
ktime_to_us(ktime_sub(ktime_get(), start)),
6881-
hba->uic_link_state, hba->curr_dev_pwr_mode);
6881+
hba->curr_dev_pwr_mode, hba->uic_link_state);
68826882
return ret;
68836883
}
68846884
EXPORT_SYMBOL(ufshcd_runtime_suspend);
@@ -6919,7 +6919,7 @@ int ufshcd_runtime_resume(struct ufs_hba *hba)
69196919
out:
69206920
trace_ufshcd_runtime_resume(dev_name(hba->dev), ret,
69216921
ktime_to_us(ktime_sub(ktime_get(), start)),
6922-
hba->uic_link_state, hba->curr_dev_pwr_mode);
6922+
hba->curr_dev_pwr_mode, hba->uic_link_state);
69236923
return ret;
69246924
}
69256925
EXPORT_SYMBOL(ufshcd_runtime_resume);

0 commit comments

Comments
 (0)