* [PATCH -next] ufs: fix source address of the read descriptor
@ 2013-08-28 15:00 Akinobu Mita
2013-08-29 17:41 ` Santosh Y
0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2013-08-28 15:00 UTC (permalink / raw)
To: linux-scsi
Cc: Akinobu Mita, Dolev Raviv, Sujit Reddy Thumma, Vinayak Holikatti,
Santosh Y, James Bottomley
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 <mita@fixstars.com>
Cc: Dolev Raviv <draviv@codeaurora.org>
Cc: Sujit Reddy Thumma <sthumma@codeaurora.org>
Cc: Vinayak Holikatti <vinholikatti@gmail.com>
Cc: Santosh Y <santoshsy@gmail.com>
Cc: James Bottomley <JBottomley@Parallels.com>
Cc: linux-scsi@vger.kernel.org
---
drivers/scsi/ufs/ufshcd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index a0f5ac2..7a319c6 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -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 */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] ufs: fix source address of the read descriptor
2013-08-28 15:00 [PATCH -next] ufs: fix source address of the read descriptor Akinobu Mita
@ 2013-08-29 17:41 ` Santosh Y
0 siblings, 0 replies; 2+ messages in thread
From: Santosh Y @ 2013-08-29 17:41 UTC (permalink / raw)
To: Akinobu Mita
Cc: linux-scsi, Dolev Raviv, Sujit Reddy Thumma, Vinayak Holikatti,
James Bottomley
On Wed, Aug 28, 2013 at 8:30 PM, Akinobu Mita <mita@fixstars.com> wrote:
> 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 <mita@fixstars.com>
> Cc: Dolev Raviv <draviv@codeaurora.org>
> Cc: Sujit Reddy Thumma <sthumma@codeaurora.org>
> Cc: Vinayak Holikatti <vinholikatti@gmail.com>
> Cc: Santosh Y <santoshsy@gmail.com>
> Cc: James Bottomley <JBottomley@Parallels.com>
> Cc: linux-scsi@vger.kernel.org
> ---
> drivers/scsi/ufs/ufshcd.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index a0f5ac2..7a319c6 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -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 */
> --
> 1.8.3.1
>
Acked-by: Santosh Y <santoshsy@gmail.com>
--
~Santosh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-29 17:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-28 15:00 [PATCH -next] ufs: fix source address of the read descriptor Akinobu Mita
2013-08-29 17:41 ` Santosh Y
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).