git: b535995861e0 - stable/14 - Intel DMAR: improve X2X macros to fix failures in certain syntax contexts

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 11 Sep 2024 08:44:19 UTC
The branch stable/14 has been updated by kib:

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

commit b535995861e0ffd6e9567844455d268ab35d8d24
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-06-06 00:52:39 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-09-11 08:43:59 +0000

    Intel DMAR: improve X2X macros to fix failures in certain syntax contexts
    
    (cherry picked from commit c47229ae66764fec85477e89d4f3861ac29abf48)
---
 sys/x86/iommu/intel_dmar.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h
index b7f0300e16f0..9eb87bcfdc35 100644
--- a/sys/x86/iommu/intel_dmar.h
+++ b/sys/x86/iommu/intel_dmar.h
@@ -87,15 +87,15 @@ struct dmar_ctx {
 #define	DMAR_DOMAIN_UNLOCK(dom)	mtx_unlock(&(dom)->iodom.lock)
 #define	DMAR_DOMAIN_ASSERT_LOCKED(dom) mtx_assert(&(dom)->iodom.lock, MA_OWNED)
 
-#define	DMAR2IOMMU(dmar)	&((dmar)->iommu)
+#define	DMAR2IOMMU(dmar)	(&((dmar)->iommu))
 #define	IOMMU2DMAR(dmar)	\
 	__containerof((dmar), struct dmar_unit, iommu)
 
-#define	DOM2IODOM(domain)	&((domain)->iodom)
+#define	DOM2IODOM(domain)	(&((domain)->iodom))
 #define	IODOM2DOM(domain)	\
 	__containerof((domain), struct dmar_domain, iodom)
 
-#define	CTX2IOCTX(ctx)		&((ctx)->context)
+#define	CTX2IOCTX(ctx)		(&((ctx)->context))
 #define	IOCTX2CTX(ctx)		\
 	__containerof((ctx), struct dmar_ctx, context)