Re: Passing NULL dev to dma_alloc_coherent() allowed or not?

2020-06-28 Thread Christoph Hellwig
You can't pass NULL. The synclink case is dead code as we stopped supporting non-PCI adapters a while ago. I had a patch to remove the !PCI code a while ago, but it seems like it never made it upstream. The staging code is, well .. staging code.

Re: Passing NULL dev to dma_alloc_coherent() allowed or not?

2020-06-27 Thread Dan Carpenter
On Sat, Jun 27, 2020 at 01:45:16PM +0200, Richard Weinberger wrote: > Hi! > > While porting on an old out-of-tree driver I noticed that dma_alloc_coherent() > was used with dev being NULL. > > commit 148a97d5a02a62f81b5d6176f871c94a65e1f3af > Author: Dan Carpenter > Date: Wed Apr 24 17:24:37

Passing NULL dev to dma_alloc_coherent() allowed or not?

2020-06-27 Thread Richard Weinberger
Hi! While porting on an old out-of-tree driver I noticed that dma_alloc_coherent() was used with dev being NULL. commit 148a97d5a02a62f81b5d6176f871c94a65e1f3af Author: Dan Carpenter Date: Wed Apr 24 17:24:37 2019 +0300 dma-mapping: remove an unnecessary NULL check We already