diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-08-27 22:06:37 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-29 10:50:24 +0100 |
commit | 9b0df250a708ed9de9552fdf543f070fe930e7ea (patch) | |
tree | 4021d848c1846015d72678b8e921f7da15022d6c /drivers/net/virtio_net.c | |
parent | a3ba7fd1d3bf6ce68a06632e755c18ae56cb1a7a (diff) |
niu: switch from 'pci_' to 'dma_' API
In [1], Christoph Hellwig has proposed to remove the wrappers in
include/linux/pci-dma-compat.h.
Some reasons why this API should be removed have been given by Julia
Lawall in [2].
A coccinelle script has been used to perform the needed transformation
Only relevant parts are given below.
It has been hand modified to use 'dma_set_mask_and_coherent()' instead of
'pci_set_dma_mask()/pci_set_consistent_dma_mask()' when applicable.
This is less verbose.
Finally, the now useless 'dma_mask' variable has been removed.
It has been compile tested.
@@
expression e1, e2;
@@
- pci_set_dma_mask(e1, e2)
+ dma_set_mask(&e1->dev, e2)
@@
expression e1, e2;
@@
- pci_set_consistent_dma_mask(e1, e2)
+ dma_set_coherent_mask(&e1->dev, e2)
[1]: https://lore.kernel.org/kernel-janitors/20200421081257.GA131897@infradead.org/
[2]: https://lore.kernel.org/kernel-janitors/alpine.DEB.2.22.394.2007120902170.2424@hadrien/
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/virtio_net.c')
0 files changed, 0 insertions, 0 deletions