lkml.org 
[lkml]   [2020]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] media: bt8xx: avoid a useless memset
From
Date
On Mon, 2020-07-27 at 15:51 +0200, Christophe JAILLET wrote:
> Avoid a memset after a call to 'dma_alloc_coherent()'.
> This is useless since
> commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*")
[]
> diff --git a/drivers/media/pci/bt8xx/btcx-risc.c b/drivers/media/pci/bt8xx/btcx-risc.c
[]
> @@ -73,7 +73,6 @@ int btcx_riscmem_alloc(struct pci_dev *pci,
> dprintk("btcx: riscmem alloc [%d] dma=%lx cpu=%p size=%d\n",
> memcnt, (unsigned long)dma, cpu, size);
> }
> - memset(risc->cpu,0,risc->size);
> return 0;
> }

Likely NAK.

This is not useless as risc->cpu may be reused
and the alloc may not have been done.


\
 
 \ /
  Last update: 2020-07-27 18:10    [W:0.367 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site