aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChanWoo Lee <[email protected]>2024-01-05 11:10:40 +0900
committerMartin K. Petersen <[email protected]>2024-01-23 21:35:33 -0500
commit325ec4ac7da6272da9b2da51b7c5cc75e48bf654 (patch)
treebfbae24b572a2e2a227fdb8a59bea69c70b1db70
parentab3e6c4e0ea149f16d5b719ecf7572862060d215 (diff)
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: ChanWoo Lee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/ufs/core/ufshcd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index f10a92681bba..c416826762e9 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -5645,7 +5645,6 @@ static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba,
struct ufshcd_lrb *lrbp;
struct scsi_cmnd *cmd;
unsigned long flags;
- u32 hwq_num, utag;
int tag;
for (tag = 0; tag < hba->nutrs; tag++) {
@@ -5655,9 +5654,7 @@ static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba,
test_bit(SCMD_STATE_COMPLETE, &cmd->state))
continue;
- utag = blk_mq_unique_tag(scsi_cmd_to_rq(cmd));
- hwq_num = blk_mq_unique_tag_to_hwq(utag);
- hwq = &hba->uhq[hwq_num];
+ hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(cmd));
if (force_compl) {
ufshcd_mcq_compl_all_cqes_lock(hba, hwq);