Thread (25 messages) 25 messages, 6 authors, 2022-05-09

Re: [PATCH 4/7] ARM: remove the unused virt_to_dma helper

From: Arnd Bergmann <arnd@kernel.org>
Date: 2022-04-21 08:01:20
Also in: linux-iommu, linux-usb, lkml

On Thu, Apr 21, 2022 at 9:42 AM Christoph Hellwig [off-list ref] wrote:
Signed-off-by: Christoph Hellwig <hch@lst.de>
I generally prefer to have at least something useful in the description, e.g.
why it's now unused and what it was used for before.
-static inline dma_addr_t virt_to_dma(struct device *dev, void *addr)
-{
-       if (dev)
-               return pfn_to_dma(dev, virt_to_pfn(addr));
-
-       return (dma_addr_t)__virt_to_bus((unsigned long)(addr));
-}
I think __virt_to_bus() is now unused as well and could be removed
in the same step.

It looks like __bus_to_virt() is still used in the ISA DMA API, but
as that is only used on footbridge and rpc, the generic version of
that could be moved into rpc (footbridge already has a custom
version).

    Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help