Skip to contentSkip to conversation

ufs: fix source address of the read descriptor

PATCH In review Akinobu Mita 2 participants 2 messages Aug 28, 2013 – Aug 29, 2013 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ufs: fix source address of the read descriptor

When the query request with read descriptor opcode is completed, the descriptor is copied from response UPIU to the buffer that the caller has specified. Unfortunately the source address of the descriptor is broken due to the unnecessary address-of operator.

Cc Dolev Raviv <[email protected]>
Cc Sujit Reddy Thumma <[email protected]>
Cc Vinayak Holikatti <[email protected]>
Cc Santosh Y <[email protected]>
Cc James Bottomley <[email protected]>
---
 drivers/scsi/ufs/ufshcd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/ufs/ufshcd.c +1 -2
index a0f5ac2..7a319c6 100644
@@ -454,8 +454,7 @@ void ufshcd_copy_query_response(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
 
 	/* Get the descriptor */
 	if (lrbp->ucd_rsp_ptr->qr.opcode == UPIU_QUERY_OPCODE_READ_DESC) {
-		u8 *descp = (u8 *)&lrbp->ucd_rsp_ptr +
-				GENERAL_UPIU_REQUEST_SIZE;
+		u8 *descp = (u8 *)lrbp->ucd_rsp_ptr + GENERAL_UPIU_REQUEST_SIZE;
 		u16 len;
 
 		/* data segment length */
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 31 lines · Akinobu Mita

When the query request with read descriptor opcode is completed, the descriptor is copied from response UPIU to the buffer that the caller has specified. Unfortunately the source address of the descriptor is broken due to the unnecessary address-of operator.

Cc Dolev Raviv <[email protected]>
Cc Sujit Reddy Thumma <[email protected]>
Cc Vinayak Holikatti <[email protected]>
Cc Santosh Y <[email protected]>
Cc James Bottomley <[email protected]>
---
 drivers/scsi/ufs/ufshcd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/ufs/ufshcd.c +1 -3
index a0f5ac2..7a319c6 100644
@@ -454,8 +454,7 @@ void ufshcd_copy_query_response(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
 
        /* Get the descriptor */
        if (lrbp->ucd_rsp_ptr->qr.opcode == UPIU_QUERY_OPCODE_READ_DESC) {
-               u8 *descp = (u8 *)&lrbp->ucd_rsp_ptr +
-                               GENERAL_UPIU_REQUEST_SIZE;
+               u8 *descp = (u8 *)lrbp->ucd_rsp_ptr + GENERAL_UPIU_REQUEST_SIZE;
                u16 len;
 
                /* data segment length */
--
Quoted 2 lines

1.8.3.1

Signature · 1 line
~Santosh