mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
Merge branch 'pci/p2pdma'
- Free struct p2p_pgmap, not a member within it, in the pci_p2pdma_add_resource() error path (Sungho Kim) - Make pci_has_p2pmem() static (Leon Romanovsky) * pci/p2pdma: PCI/P2PDMA: Reduce scope of pci_has_p2pmem() PCI/P2PDMA: Fix incorrect pointer usage in devm_kfree() call
This commit is contained in:
commit
0bb65e3249
|
|
@ -360,7 +360,7 @@ int pci_p2pdma_add_resource(struct pci_dev *pdev, int bar, size_t size,
|
|||
pages_free:
|
||||
devm_memunmap_pages(&pdev->dev, pgmap);
|
||||
pgmap_free:
|
||||
devm_kfree(&pdev->dev, pgmap);
|
||||
devm_kfree(&pdev->dev, p2p_pgmap);
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pci_p2pdma_add_resource);
|
||||
|
|
@ -738,7 +738,7 @@ EXPORT_SYMBOL_GPL(pci_p2pdma_distance_many);
|
|||
* pci_has_p2pmem - check if a given PCI device has published any p2pmem
|
||||
* @pdev: PCI device to check
|
||||
*/
|
||||
bool pci_has_p2pmem(struct pci_dev *pdev)
|
||||
static bool pci_has_p2pmem(struct pci_dev *pdev)
|
||||
{
|
||||
struct pci_p2pdma *p2pdma;
|
||||
bool res;
|
||||
|
|
@ -750,7 +750,6 @@ bool pci_has_p2pmem(struct pci_dev *pdev)
|
|||
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pci_has_p2pmem);
|
||||
|
||||
/**
|
||||
* pci_p2pmem_find_many - find a peer-to-peer DMA memory device compatible with
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ int pci_p2pdma_add_resource(struct pci_dev *pdev, int bar, size_t size,
|
|||
u64 offset);
|
||||
int pci_p2pdma_distance_many(struct pci_dev *provider, struct device **clients,
|
||||
int num_clients, bool verbose);
|
||||
bool pci_has_p2pmem(struct pci_dev *pdev);
|
||||
struct pci_dev *pci_p2pmem_find_many(struct device **clients, int num_clients);
|
||||
void *pci_alloc_p2pmem(struct pci_dev *pdev, size_t size);
|
||||
void pci_free_p2pmem(struct pci_dev *pdev, void *addr, size_t size);
|
||||
|
|
@ -45,10 +44,6 @@ static inline int pci_p2pdma_distance_many(struct pci_dev *provider,
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
static inline bool pci_has_p2pmem(struct pci_dev *pdev)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static inline struct pci_dev *pci_p2pmem_find_many(struct device **clients,
|
||||
int num_clients)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user