git: d005c4c6de6b - stable/13 - LinuxKPI: dma-mapping.h unify "mask" and "dma_mask"

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Fri, 19 Nov 2021 00:02:28 UTC
The branch stable/13 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=d005c4c6de6b314d6e83811c01df035bd5d511fc

commit d005c4c6de6b314d6e83811c01df035bd5d511fc
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2021-09-27 20:48:02 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2021-11-19 00:01:24 +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
    
    (cherry picked from commit 72c89ce97ba3f023463930578c6df7f0374cbf17)
---
 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);
 }