Commit 325ec4ac authored by ChanWoo Lee's avatar ChanWoo Lee Committed by Martin K. Petersen

scsi: ufs: mcq: Use ufshcd_mcq_req_to_hwq() to simplify updating hwq

Use ufshcd_mcq_req_to_hwq() to remove unnecessary variables and simplify.
Signed-off-by: default avatarChanWoo Lee <cw9316.lee@samsung.com>
Link: https://lore.kernel.org/r/20240105021041.20400-2-cw9316.lee@samsung.comReviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ab3e6c4e
...@@ -5645,7 +5645,6 @@ static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba, ...@@ -5645,7 +5645,6 @@ static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba,
struct ufshcd_lrb *lrbp; struct ufshcd_lrb *lrbp;
struct scsi_cmnd *cmd; struct scsi_cmnd *cmd;
unsigned long flags; unsigned long flags;
u32 hwq_num, utag;
int tag; int tag;
for (tag = 0; tag < hba->nutrs; tag++) { for (tag = 0; tag < hba->nutrs; tag++) {
...@@ -5655,9 +5654,7 @@ static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba, ...@@ -5655,9 +5654,7 @@ static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba,
test_bit(SCMD_STATE_COMPLETE, &cmd->state)) test_bit(SCMD_STATE_COMPLETE, &cmd->state))
continue; continue;
utag = blk_mq_unique_tag(scsi_cmd_to_rq(cmd)); hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(cmd));
hwq_num = blk_mq_unique_tag_to_hwq(utag);
hwq = &hba->uhq[hwq_num];
if (force_compl) { if (force_compl) {
ufshcd_mcq_compl_all_cqes_lock(hba, hwq); ufshcd_mcq_compl_all_cqes_lock(hba, hwq);
......
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