git: c63c4e694cfb - main - Don't bother to check COMPAT_32BIT when __LP64__ is defined
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Jul 2023 17:51:54 UTC
The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c63c4e694cfb0a2cba46b91869f7630e2afd80ae commit c63c4e694cfb0a2cba46b91869f7630e2afd80ae Author: Jessica Clarke <jrtc27@FreeBSD.org> AuthorDate: 2023-07-09 17:45:32 +0000 Commit: Jessica Clarke <jrtc27@FreeBSD.org> CommitDate: 2023-07-09 17:45:32 +0000 Don't bother to check COMPAT_32BIT when __LP64__ is defined Under COMPAT_32BIT we are compiling 32-bit code and so __LP64__ is not defined, __ILP32__ is, and thus the check is completely redundant. Reviewed by: brooks, jhb, imp Differential Revision: https://reviews.freebsd.org/D40917 --- sys/cddl/compat/opensolaris/sys/atomic.h | 4 ++-- sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/cddl/compat/opensolaris/sys/atomic.h b/sys/cddl/compat/opensolaris/sys/atomic.h index 674ca5b1ff24..68929f701a24 100644 --- a/sys/cddl/compat/opensolaris/sys/atomic.h +++ b/sys/cddl/compat/opensolaris/sys/atomic.h @@ -157,7 +157,7 @@ atomic_dec_64_nv(volatile uint64_t *target) return (atomic_add_64_nv(target, -1)); } -#if !defined(COMPAT_32BIT) && defined(__LP64__) +#ifdef __LP64__ static __inline void * atomic_cas_ptr(volatile void *target, void *cmp, void *newval) { @@ -171,6 +171,6 @@ atomic_cas_ptr(volatile void *target, void *cmp, void *newval) return ((void *)atomic_cas_32((volatile uint32_t *)target, (uint32_t)cmp, (uint32_t)newval)); } -#endif /* !defined(COMPAT_32BIT) && defined(__LP64__) */ +#endif /* __LP64__ */ #endif /* !_OPENSOLARIS_SYS_ATOMIC_H_ */ diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h index ccbf6d3293c4..40a67704fde0 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h @@ -167,7 +167,7 @@ atomic_dec_64_nv(volatile uint64_t *target) return (atomic_add_64_nv(target, -1)); } -#if !defined(COMPAT_32BIT) && defined(__LP64__) +#ifdef __LP64__ static __inline void * atomic_cas_ptr(volatile void *target, void *cmp, void *newval) { @@ -181,7 +181,7 @@ atomic_cas_ptr(volatile void *target, void *cmp, void *newval) return ((void *)atomic_cas_32((volatile uint32_t *)target, (uint32_t)cmp, (uint32_t)newval)); } -#endif /* !defined(COMPAT_32BIT) && defined(__LP64__) */ +#endif /* __LP64__ */ #else /* _STANDALONE */ /*