Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

PCI/P2PDMA: Reduce scope of pci_has_p2pmem()

pci_has_p2pmem() is not used outside of p2pdma.c, and there is no need to
export it for use by modules.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Link: https://patch.msgid.link/d40f3f1decf54c9236bc38b48a6aae612a5c182f.1756900291.git.leon@kernel.org

authored by

Leon Romanovsky and committed by
Bjorn Helgaas
54dbd2a8 6238784e

+1 -7
+1 -2
drivers/pci/p2pdma.c
··· 738 738 * pci_has_p2pmem - check if a given PCI device has published any p2pmem 739 739 * @pdev: PCI device to check 740 740 */ 741 - bool pci_has_p2pmem(struct pci_dev *pdev) 741 + static bool pci_has_p2pmem(struct pci_dev *pdev) 742 742 { 743 743 struct pci_p2pdma *p2pdma; 744 744 bool res; ··· 750 750 751 751 return res; 752 752 } 753 - EXPORT_SYMBOL_GPL(pci_has_p2pmem); 754 753 755 754 /** 756 755 * pci_p2pmem_find_many - find a peer-to-peer DMA memory device compatible with
-5
include/linux/pci-p2pdma.h
··· 21 21 u64 offset); 22 22 int pci_p2pdma_distance_many(struct pci_dev *provider, struct device **clients, 23 23 int num_clients, bool verbose); 24 - bool pci_has_p2pmem(struct pci_dev *pdev); 25 24 struct pci_dev *pci_p2pmem_find_many(struct device **clients, int num_clients); 26 25 void *pci_alloc_p2pmem(struct pci_dev *pdev, size_t size); 27 26 void pci_free_p2pmem(struct pci_dev *pdev, void *addr, size_t size); ··· 43 44 struct device **clients, int num_clients, bool verbose) 44 45 { 45 46 return -1; 46 - } 47 - static inline bool pci_has_p2pmem(struct pci_dev *pdev) 48 - { 49 - return false; 50 47 } 51 48 static inline struct pci_dev *pci_p2pmem_find_many(struct device **clients, 52 49 int num_clients)