mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:46:16 +00:00
change alloc_pages name in dma_map_ops to avoid name conflicts
After redefining alloc_pages, all uses of that name are being replaced. Change the conflicting names to prevent preprocessor from replacing them when it's not intended. Link: https://lkml.kernel.org/r/20240321163705.3067592-18-surenb@google.com Signed-off-by: Suren Baghdasaryan <surenb@google.com> Tested-by: Kees Cook <keescook@chromium.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Alex Gaynor <alex.gaynor@gmail.com> Cc: Alice Ryhl <aliceryhl@google.com> Cc: Andreas Hindborg <a.hindborg@samsung.com> Cc: Benno Lossin <benno.lossin@proton.me> Cc: "Björn Roy Baron" <bjorn3_gh@protonmail.com> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Christoph Lameter <cl@linux.com> Cc: Dennis Zhou <dennis@kernel.org> Cc: Gary Guo <gary@garyguo.net> Cc: Kent Overstreet <kent.overstreet@linux.dev> Cc: Miguel Ojeda <ojeda@kernel.org> Cc: Pasha Tatashin <pasha.tatashin@soleen.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tejun Heo <tj@kernel.org> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Wedson Almeida Filho <wedsonaf@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
ccdabb1d7f
commit
8a2f118787
@ -929,7 +929,7 @@ const struct dma_map_ops alpha_pci_ops = {
|
||||
.dma_supported = alpha_pci_supported,
|
||||
.mmap = dma_common_mmap,
|
||||
.get_sgtable = dma_common_get_sgtable,
|
||||
.alloc_pages = dma_common_alloc_pages,
|
||||
.alloc_pages_op = dma_common_alloc_pages,
|
||||
.free_pages = dma_common_free_pages,
|
||||
};
|
||||
EXPORT_SYMBOL(alpha_pci_ops);
|
||||
|
@ -617,7 +617,7 @@ const struct dma_map_ops jazz_dma_ops = {
|
||||
.sync_sg_for_device = jazz_dma_sync_sg_for_device,
|
||||
.mmap = dma_common_mmap,
|
||||
.get_sgtable = dma_common_get_sgtable,
|
||||
.alloc_pages = dma_common_alloc_pages,
|
||||
.alloc_pages_op = dma_common_alloc_pages,
|
||||
.free_pages = dma_common_free_pages,
|
||||
};
|
||||
EXPORT_SYMBOL(jazz_dma_ops);
|
||||
|
@ -216,6 +216,6 @@ const struct dma_map_ops dma_iommu_ops = {
|
||||
.get_required_mask = dma_iommu_get_required_mask,
|
||||
.mmap = dma_common_mmap,
|
||||
.get_sgtable = dma_common_get_sgtable,
|
||||
.alloc_pages = dma_common_alloc_pages,
|
||||
.alloc_pages_op = dma_common_alloc_pages,
|
||||
.free_pages = dma_common_free_pages,
|
||||
};
|
||||
|
@ -695,7 +695,7 @@ static const struct dma_map_ops ps3_sb_dma_ops = {
|
||||
.unmap_page = ps3_unmap_page,
|
||||
.mmap = dma_common_mmap,
|
||||
.get_sgtable = dma_common_get_sgtable,
|
||||
.alloc_pages = dma_common_alloc_pages,
|
||||
.alloc_pages_op = dma_common_alloc_pages,
|
||||
.free_pages = dma_common_free_pages,
|
||||
};
|
||||
|
||||
@ -709,7 +709,7 @@ static const struct dma_map_ops ps3_ioc0_dma_ops = {
|
||||
.unmap_page = ps3_unmap_page,
|
||||
.mmap = dma_common_mmap,
|
||||
.get_sgtable = dma_common_get_sgtable,
|
||||
.alloc_pages = dma_common_alloc_pages,
|
||||
.alloc_pages_op = dma_common_alloc_pages,
|
||||
.free_pages = dma_common_free_pages,
|
||||
};
|
||||
|
||||
|
@ -611,7 +611,7 @@ static const struct dma_map_ops vio_dma_mapping_ops = {
|
||||
.get_required_mask = dma_iommu_get_required_mask,
|
||||
.mmap = dma_common_mmap,
|
||||
.get_sgtable = dma_common_get_sgtable,
|
||||
.alloc_pages = dma_common_alloc_pages,
|
||||
.alloc_pages_op = dma_common_alloc_pages,
|
||||
.free_pages = dma_common_free_pages,
|
||||
};
|
||||
|
||||
|
@ -676,7 +676,7 @@ static const struct dma_map_ops gart_dma_ops = {
|
||||
.get_sgtable = dma_common_get_sgtable,
|
||||
.dma_supported = dma_direct_supported,
|
||||
.get_required_mask = dma_direct_get_required_mask,
|
||||
.alloc_pages = dma_direct_alloc_pages,
|
||||
.alloc_pages_op = dma_direct_alloc_pages,
|
||||
.free_pages = dma_direct_free_pages,
|
||||
};
|
||||
|
||||
|
@ -1723,7 +1723,7 @@ static const struct dma_map_ops iommu_dma_ops = {
|
||||
.flags = DMA_F_PCI_P2PDMA_SUPPORTED,
|
||||
.alloc = iommu_dma_alloc,
|
||||
.free = iommu_dma_free,
|
||||
.alloc_pages = dma_common_alloc_pages,
|
||||
.alloc_pages_op = dma_common_alloc_pages,
|
||||
.free_pages = dma_common_free_pages,
|
||||
.alloc_noncontiguous = iommu_dma_alloc_noncontiguous,
|
||||
.free_noncontiguous = iommu_dma_free_noncontiguous,
|
||||
|
@ -1022,7 +1022,7 @@ static const struct dma_map_ops ccio_ops = {
|
||||
.map_sg = ccio_map_sg,
|
||||
.unmap_sg = ccio_unmap_sg,
|
||||
.get_sgtable = dma_common_get_sgtable,
|
||||
.alloc_pages = dma_common_alloc_pages,
|
||||
.alloc_pages_op = dma_common_alloc_pages,
|
||||
.free_pages = dma_common_free_pages,
|
||||
};
|
||||
|
||||
|
@ -1090,7 +1090,7 @@ static const struct dma_map_ops sba_ops = {
|
||||
.map_sg = sba_map_sg,
|
||||
.unmap_sg = sba_unmap_sg,
|
||||
.get_sgtable = dma_common_get_sgtable,
|
||||
.alloc_pages = dma_common_alloc_pages,
|
||||
.alloc_pages_op = dma_common_alloc_pages,
|
||||
.free_pages = dma_common_free_pages,
|
||||
};
|
||||
|
||||
|
@ -282,7 +282,7 @@ static int xen_grant_dma_supported(struct device *dev, u64 mask)
|
||||
static const struct dma_map_ops xen_grant_dma_ops = {
|
||||
.alloc = xen_grant_dma_alloc,
|
||||
.free = xen_grant_dma_free,
|
||||
.alloc_pages = xen_grant_dma_alloc_pages,
|
||||
.alloc_pages_op = xen_grant_dma_alloc_pages,
|
||||
.free_pages = xen_grant_dma_free_pages,
|
||||
.mmap = dma_common_mmap,
|
||||
.get_sgtable = dma_common_get_sgtable,
|
||||
|
@ -403,7 +403,7 @@ const struct dma_map_ops xen_swiotlb_dma_ops = {
|
||||
.dma_supported = xen_swiotlb_dma_supported,
|
||||
.mmap = dma_common_mmap,
|
||||
.get_sgtable = dma_common_get_sgtable,
|
||||
.alloc_pages = dma_common_alloc_pages,
|
||||
.alloc_pages_op = dma_common_alloc_pages,
|
||||
.free_pages = dma_common_free_pages,
|
||||
.max_mapping_size = swiotlb_max_mapping_size,
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ struct dma_map_ops {
|
||||
unsigned long attrs);
|
||||
void (*free)(struct device *dev, size_t size, void *vaddr,
|
||||
dma_addr_t dma_handle, unsigned long attrs);
|
||||
struct page *(*alloc_pages)(struct device *dev, size_t size,
|
||||
struct page *(*alloc_pages_op)(struct device *dev, size_t size,
|
||||
dma_addr_t *dma_handle, enum dma_data_direction dir,
|
||||
gfp_t gfp);
|
||||
void (*free_pages)(struct device *dev, size_t size, struct page *vaddr,
|
||||
|
@ -570,9 +570,9 @@ static struct page *__dma_alloc_pages(struct device *dev, size_t size,
|
||||
size = PAGE_ALIGN(size);
|
||||
if (dma_alloc_direct(dev, ops))
|
||||
return dma_direct_alloc_pages(dev, size, dma_handle, dir, gfp);
|
||||
if (!ops->alloc_pages)
|
||||
if (!ops->alloc_pages_op)
|
||||
return NULL;
|
||||
return ops->alloc_pages(dev, size, dma_handle, dir, gfp);
|
||||
return ops->alloc_pages_op(dev, size, dma_handle, dir, gfp);
|
||||
}
|
||||
|
||||
struct page *dma_alloc_pages(struct device *dev, size_t size,
|
||||
|
Loading…
Reference in New Issue
Block a user