OpenCloudOS-Kernel/drivers/net/ethernet/sun
Christophe JAILLET 9b0df250a7 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>
2021-08-29 10:50:24 +01:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
cassini.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
cassini.h net: sun: cassini: Cleanup license conflict 2019-01-22 11:22:07 -08:00
ldmvsw.c sparc/vio: make remove callback return void 2021-05-14 13:45:58 +02:00
niu.c niu: switch from 'pci_' to 'dma_' API 2021-08-29 10:50:24 +01:00
niu.h
sunbmac.c net: sunbmac: Replace in_interrupt() usage 2020-09-29 14:02:54 -07:00
sunbmac.h
sungem.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
sungem.h
sunhme.c net: sunhme: Remove unused macros 2021-08-23 11:58:33 +01:00
sunhme.h
sunqe.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
sunqe.h
sunvnet.c sparc/vio: make remove callback return void 2021-05-14 13:45:58 +02:00
sunvnet_common.c skb_copy_and_csum_bits(): don't bother with the last argument 2020-08-20 15:45:13 -04:00
sunvnet_common.h netdev: pass the stuck queue to the timeout handler 2019-12-12 21:38:57 -08:00