ufs: fix source address of the read descriptor
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.
Signed-off-by Akinobu Mita <[email protected]>
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
@@ -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
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.
Signed-off-by Akinobu Mita <[email protected]>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@@ -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
Acked-by Santosh Y <[email protected]>
Signature · 1 line
~Santosh