[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b883b856-af1e-a017-6af2-2aca575c24d5@wanadoo.fr>
Date: Tue, 28 Jul 2020 10:01:20 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Joe Perches <joe@...ches.com>, mchehab@...nel.org,
akpm@...ux-foundation.org, rppt@...nel.org,
hverkuil-cisco@...all.nl
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 2/2] media: bt8xx: avoid a useless memset
Le 27/07/2020 à 18:09, Joe Perches a écrit :
> 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.
>
>
>
Agreed.
This 2/2 patch should be NAK'ed.
I've been a bit too fast on this one.
Thanks for the review Joe.
CJ
Powered by blists - more mailing lists