linux/drivers/net
Christophe JAILLET 4c900a6b4e farsync: switch from 'pci_' to 'dma_' API
The wrappers in include/linux/pci-dma-compat.h should go away.

The patch has been generated with the coccinelle script below and has been
hand modified to replace GFP_ with a correct flag.
It has been compile tested.

When memory is allocated in 'fst_add_one()', GFP_KERNEL can be used
because it is a probe function and no lock is acquired.

@@
@@
-    PCI_DMA_BIDIRECTIONAL
+    DMA_BIDIRECTIONAL

@@
@@
-    PCI_DMA_TODEVICE
+    DMA_TO_DEVICE

@@
@@
-    PCI_DMA_FROMDEVICE
+    DMA_FROM_DEVICE

@@
@@
-    PCI_DMA_NONE
+    DMA_NONE

@@
expression e1, e2, e3;
@@
-    pci_alloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3;
@@
-    pci_zalloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3, e4;
@@
-    pci_free_consistent(e1, e2, e3, e4)
+    dma_free_coherent(&e1->dev, e2, e3, e4)

@@
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, e3, e4, e5;
@@
-    pci_map_page(e1, e2, e3, e4, e5)
+    dma_map_page(&e1->dev, e2, e3, e4, e5)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_page(e1, e2, e3, e4)
+    dma_unmap_page(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_sg(e1, e2, e3, e4)
+    dma_map_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_sg(e1, e2, e3, e4)
+    dma_unmap_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
+    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_device(e1, e2, e3, e4)
+    dma_sync_single_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
+    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
+    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2;
@@
-    pci_dma_mapping_error(e1, e2)
+    dma_mapping_error(&e1->dev, e2)

@@
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)

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-08-04 16:17:22 -07:00
..
appletalk
arcnet
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
caif caif: fix cfv_netdev_tx()'s return type 2020-06-28 20:52:53 -07:00
can
dsa net: dsa: loop: Set correct number of ports 2020-08-03 18:19:23 -07:00
ethernet dpaa2-eth: Fix passing zero to 'PTR_ERR' warning 2020-08-04 16:10:24 -07:00
fddi net: fddi: skfp: Remove addr_to_string(). 2020-07-13 11:49:51 -07:00
fjes
hamradio
hippi hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path 2020-07-14 14:11:49 -07:00
hyperv hv_netvsc: do not use VF device if link is down 2020-08-04 16:15:16 -07:00
ieee802154 net: ieee802154: adf7242: Replace HTTP links with HTTPS ones 2020-07-20 08:51:38 +02:00
ipa net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipvlan
netdevsim Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-08-03 18:27:40 -07:00
phy net: phy: mdio-mvusb: select MDIO_DEVRES in Kconfig 2020-08-03 15:49:49 -07:00
plip net: plip: fix plip_tx_packet()'s return type 2020-06-28 20:52:53 -07:00
ppp net: make ->{get,set}sockopt in proto_ops optional 2020-07-19 18:16:41 -07:00
slip
team
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-08-02 01:02:12 -07:00
vmxnet3
wan farsync: switch from 'pci_' to 'dma_' API 2020-08-04 16:17:22 -07:00
wimax
wireguard wireguard: queueing: make use of ip_tunnel_parse_protocol 2020-06-30 12:29:39 -07:00
wireless wireless-drivers-next patches for v5.9 2020-08-04 12:57:02 -07:00
xen-netback xen networking: add XDP offset adjustment to xen-netback 2020-07-01 15:25:14 -07:00
bareudp.c tunnels: PMTU discovery support for directly bridged IP packets 2020-08-04 13:01:45 -07:00
dummy.c
eql.c
geneve.c geneve: Support for PMTU discovery on directly bridged links 2020-08-04 13:01:45 -07:00
gtp.c
ifb.c
Kconfig xen networking: add basic XDP support for xen-netfront 2020-07-01 15:25:14 -07:00
LICENSE.SRC
loopback.c
macsec.c net: get rid of lockdep_set_class_and_subclass() 2020-06-28 21:37:23 -07:00
macvlan.c net: get rid of lockdep_set_class_and_subclass() 2020-06-28 21:37:23 -07:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-08-03 18:27:40 -07:00
veth.c bpf, xdp: Remove XDP_QUERY_PROG and XDP_QUERY_PROG_HW XDP commands 2020-07-25 20:37:02 -07:00
virtio_net.c bpf, xdp: Remove XDP_QUERY_PROG and XDP_QUERY_PROG_HW XDP commands 2020-07-25 20:37:02 -07:00
vrf.c vrf: Handle CONFIG_SYSCTL not set 2020-07-23 17:51:04 -07:00
vsockmon.c
vxlan.c vxlan: Support for PMTU discovery on directly bridged links 2020-08-04 13:01:45 -07:00
xen-netfront.c bpf, xdp: Remove XDP_QUERY_PROG and XDP_QUERY_PROG_HW XDP commands 2020-07-25 20:37:02 -07:00