Message ID | 20220219005221.634-2-bhe@redhat.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Herbert Xu |
Headers | show |
Series | Don't use kmalloc() with GFP_DMA | expand |
On Sat, Feb 19, 2022 at 08:52:00AM +0800, Baoquan He wrote: > The gfp assignment has been commented out in ancient times, combined with > the code comment, obviously it's not needed since then. Let's remove the > whole ifdeffery block so that GFP_DMA searching won't point to this. Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index 36a57aa38e87..6c7c6314ef33 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c @@ -417,14 +417,6 @@ void *arch_dma_alloc(struct device *dev, size_t size, map_uncached_pages(vaddr, size, paddr); *dma_handle = (dma_addr_t) paddr; -#if 0 -/* This probably isn't needed to support EISA cards. -** ISA cards will certainly only support 24-bit DMA addressing. -** Not clear if we can, want, or need to support ISA. -*/ - if (!dev || *dev->coherent_dma_mask < 0xffffffff) - gfp |= GFP_DMA; -#endif return (void *)vaddr; }
The gfp assignment has been commented out in ancient times, combined with the code comment, obviously it's not needed since then. Let's remove the whole ifdeffery block so that GFP_DMA searching won't point to this. Signed-off-by: Baoquan He <bhe@redhat.com> --- arch/parisc/kernel/pci-dma.c | 8 -------- 1 file changed, 8 deletions(-)