Commit f0101af4 authored by Bean Huo's avatar Bean Huo Committed by Martin K. Petersen

scsi: ufs: core: Remove redundant call in ufshcd_add_command_trace()

ufshcd_add_cmd_upiu_trace() will be called later anyway. Simplify code by
moving if-statement.

Link: https://lore.kernel.org/r/20210802180803.100033-1-huobean@gmail.comReviewed-by: default avatarAvri Altman <avri.altman@wdc.com>
Signed-off-by: default avatarBean Huo <beanhuo@micron.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 77d0f07a
......@@ -369,14 +369,11 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
if (!cmd)
return;
if (!trace_ufshcd_command_enabled()) {
/* trace UPIU W/O tracing command */
ufshcd_add_cmd_upiu_trace(hba, tag, str_t);
return;
}
/* trace UPIU also */
ufshcd_add_cmd_upiu_trace(hba, tag, str_t);
if (!trace_ufshcd_command_enabled())
return;
opcode = cmd->cmnd[0];
lba = scsi_get_lba(cmd);
......
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