PCI: Remove pci_set_dma_seg_boundary()
authorChristoph Hellwig <hch@lst.de>
Tue, 9 Oct 2018 14:08:23 +0000 (16:08 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 10 Oct 2018 20:46:47 +0000 (15:46 -0500)
The two callers can just use dma_set_seg_boundary() directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/probe.c
drivers/s390/net/ism_drv.c
include/linux/pci-dma-compat.h

index 7c422cc..72dd926 100644 (file)
@@ -2398,7 +2398,7 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
        dev->dev.coherent_dma_mask = 0xffffffffull;
 
        pci_set_dma_max_seg_size(dev, 65536);
-       pci_set_dma_seg_boundary(dev, 0xffffffff);
+       dma_set_seg_boundary(&dev->dev, 0xffffffff);
 
        /* Fix up broken headers */
        pci_fixup_device(pci_fixup_header, dev);
index c063189..8688c0f 100644 (file)
@@ -515,7 +515,7 @@ static int ism_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        if (ret)
                goto err_unmap;
 
-       pci_set_dma_seg_boundary(pdev, SZ_1M - 1);
+       dma_set_seg_boundary(&pdev->dev, SZ_1M - 1);
        pci_set_dma_max_seg_size(pdev, SZ_1M);
        pci_set_master(pdev);
 
index c3f1b44..558a109 100644 (file)
@@ -125,12 +125,6 @@ static inline int pci_set_dma_max_seg_size(struct pci_dev *dev,
 {
        return dma_set_max_seg_size(&dev->dev, size);
 }
-
-static inline int pci_set_dma_seg_boundary(struct pci_dev *dev,
-                                          unsigned long mask)
-{
-       return dma_set_seg_boundary(&dev->dev, mask);
-}
 #else
 static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
 { return -EIO; }
@@ -139,9 +133,6 @@ static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
 static inline int pci_set_dma_max_seg_size(struct pci_dev *dev,
                                           unsigned int size)
 { return -EIO; }
-static inline int pci_set_dma_seg_boundary(struct pci_dev *dev,
-                                          unsigned long mask)
-{ return -EIO; }
 #endif
 
 #endif