diff options
author | Minwoo Im <minwoo.im@samsung.com> | 2024-05-20 07:14:56 +0900 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-05-30 20:45:39 -0400 |
commit | 2fc39848952dfb91a9233563cc1444669b8e79c3 (patch) | |
tree | 99a004f7550ef3a5e20f4ab3d1ec2d8799c79a45 /include/ufs | |
parent | 23646f013404a69e2cc5b1be51eef67e720d7021 (diff) | |
download | linux-2fc39848952dfb91a9233563cc1444669b8e79c3.tar.gz linux-2fc39848952dfb91a9233563cc1444669b8e79c3.tar.bz2 linux-2fc39848952dfb91a9233563cc1444669b8e79c3.zip |
scsi: ufs: mcq: Fix missing argument 'hba' in MCQ_OPR_OFFSET_n
The MCQ_OPR_OFFSET_n macro takes 'hba' in the caller context without
receiving 'hba' instance as an argument. To prevent potential bugs in
future use cases, add an argument 'hba'.
Fixes: 2468da61ea09 ("scsi: ufs: core: mcq: Configure operation and runtime interface")
Cc: Asutosh Das <quic_asutoshd@quicinc.com>
Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
Link: https://lore.kernel.org/r/20240519221457.772346-2-minwoo.im@samsung.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/ufs')
-rw-r--r-- | include/ufs/ufshcd.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h index ef04ec8aad69..1150b86e9355 100644 --- a/include/ufs/ufshcd.h +++ b/include/ufs/ufshcd.h @@ -1135,6 +1135,12 @@ static inline bool is_mcq_enabled(struct ufs_hba *hba) return hba->mcq_enabled; } +static inline unsigned int ufshcd_mcq_opr_offset(struct ufs_hba *hba, + enum ufshcd_mcq_opr opr, int idx) +{ + return hba->mcq_opr[opr].offset + hba->mcq_opr[opr].stride * idx; +} + #ifdef CONFIG_SCSI_UFS_VARIABLE_SG_ENTRY_SIZE static inline size_t ufshcd_sg_entry_size(const struct ufs_hba *hba) { |