Commit 3dfc2f73 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] rename dma_error()

We're getting namespace collisions from the new dma_error(), and it wasn't a
well-chosen identifier.  Rename it to dma_mapping_error().
parent 21407a1c
......@@ -279,14 +279,14 @@ recommended that you never use these unless you really know what the
cache width is.
int
dma_error(dma_addr_t dma_addr)
dma_mapping_error(dma_addr_t dma_addr)
int
pci_dma_error(dma_addr_t dma_addr)
pci_dma_mapping_error(dma_addr_t dma_addr)
In some circumstances dma_map_single and dma_map_page will fail to create
a mapping. A driver can check for these errors by testing the returned
dma address with dma_error(). A non zero return value means the mapping
dma address with dma_mapping_error(). A non zero return value means the mapping
could not be created and the driver should take appropriate action (eg
reduce current DMA mapping usage or delay and try again later).
......
......@@ -850,12 +850,12 @@ failure can be determined by:
- checking if pci_alloc_consistent returns NULL or pci_map_sg returns 0
- checking the returned dma_addr_t of pci_map_single and pci_map_page
by using pci_dma_error():
by using pci_dma_mapping_error():
dma_addr_t dma_handle;
dma_handle = pci_map_single(dev, addr, size, direction);
if (pci_dma_error(dma_handle)) {
if (pci_dma_mapping_error(dma_handle)) {
/*
* reduce current DMA mapping usage,
* delay and try again later or
......
......@@ -141,9 +141,9 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
}
static inline int
dma_error(dma_addr_t dma_addr)
dma_mapping_error(dma_addr_t dma_addr)
{
return pci_dma_error(dma_addr);
return pci_dma_mapping_error(dma_addr);
}
/* Now for the API extensions over the pci_ one */
......
......@@ -99,9 +99,9 @@ pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sg,
}
static inline int
pci_dma_error(dma_addr_t dma_addr)
pci_dma_mapping_error(dma_addr_t dma_addr)
{
return dma_error(dma_addr);
return dma_mapping_error(dma_addr);
}
#endif
......@@ -111,7 +111,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
}
static inline int
dma_error(dma_addr_t dma_addr)
dma_mapping_error(dma_addr_t dma_addr)
{
return 0;
}
......
......@@ -170,7 +170,7 @@ static inline int pci_dac_dma_supported(struct pci_dev *hwdev,u64 mask)
}
#define PCI_DMA_ERROR_CODE (~(dma_addr_t)0x0)
static inline int pci_dma_error(dma_addr_t dma_addr)
static inline int pci_dma_mapping_error(dma_addr_t dma_addr)
{
return (dma_addr == PCI_DMA_ERROR_CODE);
}
......
......@@ -215,7 +215,7 @@ pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr,
#define PCI_DMA_ERROR_CODE (~(dma_addr_t)0x0)
static inline int pci_dma_error(dma_addr_t dma_addr)
static inline int pci_dma_mapping_error(dma_addr_t dma_addr)
{
return (dma_addr == PCI_DMA_ERROR_CODE);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment