OpenCloudOS-Kernel/drivers/net/ethernet/toshiba
Christophe JAILLET 27d57f8510 net: spider_net: 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.

@@ @@
-    PCI_DMA_BIDIRECTIONAL
+    DMA_BIDIRECTIONAL

@@ @@
-    PCI_DMA_TODEVICE
+    DMA_TO_DEVICE

@@ @@
-    PCI_DMA_FROMDEVICE
+    DMA_FROM_DEVICE

@@
expression e1, e2, e3, e4;
@@
-    pci_map_single(e1, e2, e3, e4)
+    dma_map_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_single(e1, e2, e3, e4)
+    dma_unmap_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2;
@@
-    pci_dma_mapping_error(e1, e2)
+    dma_mapping_error(&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>
Acked-by: Geoff Levand <geoff@infradead.org>
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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ps3_gelic_net.c net: ethernet: toshiba: ps3_gelic_net: Fix some kernel-doc misdemeanours 2021-01-16 18:13:23 -08:00
ps3_gelic_net.h toshiba: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
ps3_gelic_wireless.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ps3_gelic_wireless.h toshiba: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
spider_net.c net: spider_net: switch from 'pci_' to 'dma_' API 2021-08-29 10:50:24 +01:00
spider_net.h toshiba: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
spider_net_ethtool.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 153 2019-05-30 11:26:32 -07:00
tc35815.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00