diff mbox series

[1/3] scsi: ufs: Remove redundant define

Message ID 20210727123546.17228-2-avri.altman@wdc.com
State New
Headers show
Series Log correct rpmb unit descriptor size | expand

Commit Message

Avri Altman July 27, 2021, 12:35 p.m. UTC
UFS_UPIU_RPMB_WLUN already describe the rpmb wlun index.

Signed-off-by: Avri Altman <avri.altman@wdc.com>
---
 drivers/scsi/ufs/ufs.h    | 1 -
 drivers/scsi/ufs/ufshcd.c | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Bean Huo July 29, 2021, 6:26 a.m. UTC | #1
On Tue, 2021-07-27 at 15:35 +0300, Avri Altman wrote:
> UFS_UPIU_RPMB_WLUN already describe the rpmb wlun index.

> 

> 

> 

> Signed-off-by: Avri Altman <avri.altman@wdc.com>


Reviewed-by: Bean Huo <beanhuo@micron.com>
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index cb80b9670bfe..579cf6f9e7a1 100644
--- a/drivers/scsi/ufs/ufs.h
+++ b/drivers/scsi/ufs/ufs.h
@@ -38,7 +38,6 @@ 
 #define UFS_UPIU_MAX_UNIT_NUM_ID	0x7F
 #define UFS_MAX_LUNS		(SCSI_W_LUN_BASE + UFS_UPIU_MAX_UNIT_NUM_ID)
 #define UFS_UPIU_WLUN_ID	(1 << 7)
-#define UFS_RPMB_UNIT		0xC4
 
 /* WriteBooster buffer is available only for the logical unit from 0 to 7 */
 #define UFS_UPIU_MAX_WB_LUN_ID	8
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 064a44e628d6..74ccfd2b80ce 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -3334,7 +3334,8 @@  static void ufshcd_update_desc_length(struct ufs_hba *hba,
 				      unsigned char desc_len)
 {
 	if (hba->desc_size[desc_id] == QUERY_DESC_MAX_SIZE &&
-	    desc_id != QUERY_DESC_IDN_STRING && desc_index != UFS_RPMB_UNIT)
+	    desc_id != QUERY_DESC_IDN_STRING &&
+	    desc_index != UFS_UPIU_RPMB_WLUN)
 		/* For UFS 3.1, the normal unit descriptor is 10 bytes larger
 		 * than the RPMB unit, however, both descriptors share the same
 		 * desc_idn, to cover both unit descriptors with one length, we