Re: [PATCH v4 15/15] dmaengine: dw-edma: Add pcim_iomap_table return checker

2021-02-09 Thread Krzysztof Wilczyński
Hi Gustavo, [...] > > That's true, there are a lot of drivers that don't verify that pointer. > > What do you suggest? > > 1) To remove the verification so that is aligned with the other drivers > > 2) Leave it as is. Or even to add this verification to the other drivers? > > > > Either way, I

Re: [PATCH v4 15/15] dmaengine: dw-edma: Add pcim_iomap_table return checker

2021-02-09 Thread Krzysztof Wilczyński
Hi Gustavo, [...] > > This "pcim_iomap_table(dev)[n]" pattern is extremely common. There > > are over 100 calls of pcim_iomap_table(), and > > > > $ git grep "pcim_iomap_table(.*)\[.*\]" | wc -l > > > > says about 75 of them are of this form, where we dereference the > > result before

RE: [PATCH v4 15/15] dmaengine: dw-edma: Add pcim_iomap_table return checker

2021-02-09 Thread Gustavo Pimentel
On Mon, Feb 8, 2021 at 19:35:16, Bjorn Helgaas wrote: > [+cc Krzysztof] > > From reading the subject, I thought you were adding a function to > check the return values, i.e., a "checker." But you're really adding > "checks" :) That's true, I will rework the subject. > > On Wed, Feb 03,

Re: [PATCH v4 15/15] dmaengine: dw-edma: Add pcim_iomap_table return checker

2021-02-08 Thread Bjorn Helgaas
[+cc Krzysztof] >From reading the subject, I thought you were adding a function to check the return values, i.e., a "checker." But you're really adding "checks" :) On Wed, Feb 03, 2021 at 10:58:06PM +0100, Gustavo Pimentel wrote: > Detected by CoverityScan CID 16555 ("Dereference null return")

[PATCH v4 15/15] dmaengine: dw-edma: Add pcim_iomap_table return checker

2021-02-03 Thread Gustavo Pimentel
Detected by CoverityScan CID 16555 ("Dereference null return") Signed-off-by: Gustavo Pimentel --- drivers/dma/dw-edma/dw-edma-pcie.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c index