mm/dmapool.c: avoid duplicate memset within dma_pool_alloc
In "dma_alloc_from_dev_coherent" and "dma_direct_alloc",
the allocated memory is explicitly set to 0.
A helper function "use_dev_coherent_memory" is introduced here to
determine whether the memory is allocated by "dma_alloc_from_dev_coherent".
And use "get_dma_ops" to determine whether the memory is allocated by
"dma_direct_alloc".
After this modification, memory allocated using "dma_pool_zalloc" can avoid
duplicate memset.
Link: https://lkml.kernel.org/r/1658125690-76930-1-git-send-email-liusong@linux.alibaba.com
Signed-off-by: Liu Song <liusong@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>