linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: cdns3: delete repeated clear operations
@ 2021-03-13  2:41 Wang Qing
  2021-03-22  7:19 ` Pawel Laszczak
  0 siblings, 1 reply; 4+ messages in thread
From: Wang Qing @ 2021-03-13  2:41 UTC (permalink / raw)
  To: Pawel Laszczak, Greg Kroah-Hartman, linux-usb, linux-kernel; +Cc: Wang Qing

dma_alloc_coherent already zeroes out memory, so memset is not needed.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 drivers/usb/cdns3/cdnsp-mem.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/cdns3/cdnsp-mem.c b/drivers/usb/cdns3/cdnsp-mem.c
index 7a84e92..1d1b9a4
--- a/drivers/usb/cdns3/cdnsp-mem.c
+++ b/drivers/usb/cdns3/cdnsp-mem.c
@@ -1231,7 +1231,6 @@ int cdnsp_mem_init(struct cdnsp_device *pdev)
 	if (!pdev->dcbaa)
 		return -ENOMEM;
 
-	memset(pdev->dcbaa, 0, sizeof(*pdev->dcbaa));
 	pdev->dcbaa->dma = dma;
 
 	cdnsp_write_64(dma, &pdev->op_regs->dcbaa_ptr);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH] usb: cdns3: delete repeated clear operations
  2021-03-13  2:41 [PATCH] usb: cdns3: delete repeated clear operations Wang Qing
@ 2021-03-22  7:19 ` Pawel Laszczak
  2021-03-27  0:55   ` Peter Chen
  0 siblings, 1 reply; 4+ messages in thread
From: Pawel Laszczak @ 2021-03-22  7:19 UTC (permalink / raw)
  To: peter.chen, Wang Qing; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

Hi Peter,

Can you add this patch to for-usb-next branch.

Thanks.

>
>
>dma_alloc_coherent already zeroes out memory, so memset is not needed.
>
>Signed-off-by: Wang Qing <wangqing@vivo.com>

Reviewed-by: Pawel Laszczak <pawell@cadence.com>

>---
> drivers/usb/cdns3/cdnsp-mem.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/drivers/usb/cdns3/cdnsp-mem.c b/drivers/usb/cdns3/cdnsp-mem.c
>index 7a84e92..1d1b9a4
>--- a/drivers/usb/cdns3/cdnsp-mem.c
>+++ b/drivers/usb/cdns3/cdnsp-mem.c
>@@ -1231,7 +1231,6 @@ int cdnsp_mem_init(struct cdnsp_device *pdev)
> 	if (!pdev->dcbaa)
> 		return -ENOMEM;
>
>-	memset(pdev->dcbaa, 0, sizeof(*pdev->dcbaa));
> 	pdev->dcbaa->dma = dma;
>
> 	cdnsp_write_64(dma, &pdev->op_regs->dcbaa_ptr);
>--
>2.7.4

Regards,
Pawel Laszczak

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: cdns3: delete repeated clear operations
  2021-03-22  7:19 ` Pawel Laszczak
@ 2021-03-27  0:55   ` Peter Chen
  2021-03-30  3:43     ` Pawel Laszczak
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Chen @ 2021-03-27  0:55 UTC (permalink / raw)
  To: Pawel Laszczak; +Cc: Wang Qing, Greg Kroah-Hartman, linux-usb, linux-kernel

On 21-03-22 07:19:46, Pawel Laszczak wrote:
> Hi Peter,
> 
> Can you add this patch to for-usb-next branch.
> 

Feel free add your ACK base on this patch.

Peter
> Thanks.
> 
> >
> >
> >dma_alloc_coherent already zeroes out memory, so memset is not needed.
> >
> >Signed-off-by: Wang Qing <wangqing@vivo.com>
> 
> Reviewed-by: Pawel Laszczak <pawell@cadence.com>
> 
> >---
> > drivers/usb/cdns3/cdnsp-mem.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> >diff --git a/drivers/usb/cdns3/cdnsp-mem.c b/drivers/usb/cdns3/cdnsp-mem.c
> >index 7a84e92..1d1b9a4
> >--- a/drivers/usb/cdns3/cdnsp-mem.c
> >+++ b/drivers/usb/cdns3/cdnsp-mem.c
> >@@ -1231,7 +1231,6 @@ int cdnsp_mem_init(struct cdnsp_device *pdev)
> > 	if (!pdev->dcbaa)
> > 		return -ENOMEM;
> >
> >-	memset(pdev->dcbaa, 0, sizeof(*pdev->dcbaa));
> > 	pdev->dcbaa->dma = dma;
> >
> > 	cdnsp_write_64(dma, &pdev->op_regs->dcbaa_ptr);
> >--
> >2.7.4
> 
> Regards,
> Pawel Laszczak

-- 

Thanks,
Peter Chen


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] usb: cdns3: delete repeated clear operations
  2021-03-27  0:55   ` Peter Chen
@ 2021-03-30  3:43     ` Pawel Laszczak
  0 siblings, 0 replies; 4+ messages in thread
From: Pawel Laszczak @ 2021-03-30  3:43 UTC (permalink / raw)
  To: Peter Chen; +Cc: Wang Qing, Greg Kroah-Hartman, linux-usb, linux-kernel

>
>On 21-03-22 07:19:46, Pawel Laszczak wrote:
>> Hi Peter,
>>
>> Can you add this patch to for-usb-next branch.
>>
>
>Feel free add your ACK base on this patch.
>
>Peter
>> Thanks.
>>
>> >
>> >
>> >dma_alloc_coherent already zeroes out memory, so memset is not needed.
>> >
>> >Signed-off-by: Wang Qing <wangqing@vivo.com>
>>
>> Reviewed-by: Pawel Laszczak <pawell@cadence.com>


Acked-by: Pawel Laszczak <pawell@cadence.com>

>>
>> >---
>> > drivers/usb/cdns3/cdnsp-mem.c | 1 -
>> > 1 file changed, 1 deletion(-)
>> >
>> >diff --git a/drivers/usb/cdns3/cdnsp-mem.c b/drivers/usb/cdns3/cdnsp-mem.c
>> >index 7a84e92..1d1b9a4
>> >--- a/drivers/usb/cdns3/cdnsp-mem.c
>> >+++ b/drivers/usb/cdns3/cdnsp-mem.c
>> >@@ -1231,7 +1231,6 @@ int cdnsp_mem_init(struct cdnsp_device *pdev)
>> > 	if (!pdev->dcbaa)
>> > 		return -ENOMEM;
>> >
>> >-	memset(pdev->dcbaa, 0, sizeof(*pdev->dcbaa));
>> > 	pdev->dcbaa->dma = dma;
>> >
>> > 	cdnsp_write_64(dma, &pdev->op_regs->dcbaa_ptr);
>> >--
>> >2.7.4
>>
>> Regards,
>> Pawel Laszczak
>
>--
>
>Thanks,
>Peter Chen

Regards,
Pawel Laszczak


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-30  3:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13  2:41 [PATCH] usb: cdns3: delete repeated clear operations Wang Qing
2021-03-22  7:19 ` Pawel Laszczak
2021-03-27  0:55   ` Peter Chen
2021-03-30  3:43     ` Pawel Laszczak

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).