git: 72c89ce97ba3 - main - LinuxKPI: dma-mapping.h unify "mask" and "dma_mask"
Bjoern A. Zeeb
bz at FreeBSD.org
Mon Sep 27 20:56:38 UTC 2021
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=72c89ce97ba3f023463930578c6df7f0374cbf17
commit 72c89ce97ba3f023463930578c6df7f0374cbf17
Author: Bjoern A. Zeeb <bz at FreeBSD.org>
AuthorDate: 2021-09-27 20:48:02 +0000
Commit: Bjoern A. Zeeb <bz at FreeBSD.org>
CommitDate: 2021-09-27 20:53:06 +0000
LinuxKPI: dma-mapping.h unify "mask" and "dma_mask"
In some places we are using "mask" and others "dma_mask" for the
same thing. Harmonize the various places to "dma_mask" as used in
linux_pci.c. For the declaration remove the argument names to
avoid the entire problem.
This is in preparation for an upcoming change.
No functional changes intended.
Sponsored by: The FreeBSD Foundation
MFC after: 5 days
---
sys/compat/linuxkpi/common/include/linux/dma-mapping.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
index 5b5bc9e90815..554d4bd4e695 100644
--- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
@@ -91,7 +91,7 @@ struct dma_map_ops {
#define DMA_BIT_MASK(n) ((2ULL << ((n) - 1)) - 1ULL)
-int linux_dma_tag_init(struct device *dev, u64 mask);
+int linux_dma_tag_init(struct device *, u64);
void *linux_dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t flag);
dma_addr_t linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len);
@@ -104,7 +104,7 @@ void linux_dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sg,
unsigned long attrs __unused);
static inline int
-dma_supported(struct device *dev, u64 mask)
+dma_supported(struct device *dev, u64 dma_mask)
{
/* XXX busdma takes care of this elsewhere. */
@@ -122,23 +122,23 @@ dma_set_mask(struct device *dev, u64 dma_mask)
}
static inline int
-dma_set_coherent_mask(struct device *dev, u64 mask)
+dma_set_coherent_mask(struct device *dev, u64 dma_mask)
{
- if (!dma_supported(dev, mask))
+ if (!dma_supported(dev, dma_mask))
return -EIO;
/* XXX Currently we don't support a separate coherent mask. */
return 0;
}
static inline int
-dma_set_mask_and_coherent(struct device *dev, u64 mask)
+dma_set_mask_and_coherent(struct device *dev, u64 dma_mask)
{
int r;
- r = dma_set_mask(dev, mask);
+ r = dma_set_mask(dev, dma_mask);
if (r == 0)
- dma_set_coherent_mask(dev, mask);
+ dma_set_coherent_mask(dev, dma_mask);
return (r);
}
More information about the dev-commits-src-all
mailing list