]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ufs: Use utp_transfer_req_desc pointer in ufshcd_get_tr_ocs
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Wed, 16 Aug 2023 15:05:54 +0000 (17:05 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 24 Aug 2023 17:47:43 +0000 (13:47 -0400)
Use utp_transfer_req_desc pointer to reference to utrdl queue
instead of referencing the queue directly. This makes the code
more consistent. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Tested-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
drivers/ufs/ufs.c

index da1009e2c1455be98dd725afa2d0d6e67a4a6dc7..041caee714fb59802514c10119cf70926b4c48c4 100644 (file)
@@ -858,7 +858,9 @@ static inline int ufshcd_get_req_rsp(struct utp_upiu_rsp *ucd_rsp_ptr)
  */
 static inline int ufshcd_get_tr_ocs(struct ufs_hba *hba)
 {
-       return le32_to_cpu(hba->utrdl->header.dword_2) & MASK_OCS;
+       struct utp_transfer_req_desc *req_desc = hba->utrdl;
+
+       return le32_to_cpu(req_desc->header.dword_2) & MASK_OCS;
 }
 
 static inline int ufshcd_get_rsp_upiu_result(struct utp_upiu_rsp *ucd_rsp_ptr)