diff options
author | Avri Altman <avri.altman@wdc.com> | 2023-03-29 13:13:03 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-04-12 04:46:59 +0300 |
commit | 3c85f087faeca3ca9ec9e7b085e1eff370e3f0db (patch) | |
tree | 1d6948cff562279fa4d493db1249bd119fe8f95d /drivers/ufs | |
parent | 4de243c40c0f6c701123eb12938a5d9caee08679 (diff) | |
download | linux-3c85f087faeca3ca9ec9e7b085e1eff370e3f0db.tar.xz |
scsi: ufs: mcq: Use pointer arithmetic in ufshcd_send_command()
Make sqe_base_addr the UTRD pointer it is, instead of an opaque void *.
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20230329101303.18377-3-avri.altman@wdc.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs')
-rw-r--r-- | drivers/ufs/core/ufshcd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 03c47f9a2750..9434328ba323 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -2242,10 +2242,11 @@ void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag, if (is_mcq_enabled(hba)) { int utrd_size = sizeof(struct utp_transfer_req_desc); + struct utp_transfer_req_desc *src = lrbp->utr_descriptor_ptr; + struct utp_transfer_req_desc *dest = hwq->sqe_base_addr + hwq->sq_tail_slot; spin_lock(&hwq->sq_lock); - memcpy(hwq->sqe_base_addr + (hwq->sq_tail_slot * utrd_size), - lrbp->utr_descriptor_ptr, utrd_size); + memcpy(dest, src, utrd_size); ufshcd_inc_sq_tail(hwq); spin_unlock(&hwq->sq_lock); } else { |