From nobody Fri Nov 19 00:02:28 2021 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 01354188F688; Fri, 19 Nov 2021 00:02:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwH0j0fSRz4vdk; Fri, 19 Nov 2021 00:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E70B1E2D1; Fri, 19 Nov 2021 00:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AJ02S7Q072278; Fri, 19 Nov 2021 00:02:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02S2B072277; Fri, 19 Nov 2021 00:02:28 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:28 GMT Message-Id: <202111190002.1AJ02S2B072277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: d005c4c6de6b - stable/13 - LinuxKPI: dma-mapping.h unify "mask" and "dma_mask" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d005c4c6de6b314d6e83811c01df035bd5d511fc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d005c4c6de6b314d6e83811c01df035bd5d511fc commit d005c4c6de6b314d6e83811c01df035bd5d511fc Author: Bjoern A. Zeeb AuthorDate: 2021-09-27 20:48:02 +0000 Commit: Bjoern A. Zeeb 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); }