The branch stable/14 has been updated by olce:

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

commit 11dde2c8b7156a7d2072589c22c2f3c0de6880d8
Author:     Olivier Certner <o...@freebsd.org>
AuthorDate: 2025-01-20 14:28:37 +0000
Commit:     Olivier Certner <o...@freebsd.org>
CommitDate: 2025-01-27 18:19:57 +0000

    atomics: Constify loads: Remove now superfluous uses of DECONST()
    
    No functional change (intended).
    
    Reviewed by:    kib
    MFC after:      4 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D48497
    
    (cherry picked from commit 9b7157c690723279d448fc7ea9c1f9374ad4511a)
---
 sys/compat/linuxkpi/common/include/linux/seqlock.h | 2 +-
 sys/sys/atomic_san.h                               | 3 +--
 sys/sys/seqc.h                                     | 4 ++--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/seqlock.h 
b/sys/compat/linuxkpi/common/include/linux/seqlock.h
index 48e42efc10fe..554fdfd6e202 100644
--- a/sys/compat/linuxkpi/common/include/linux/seqlock.h
+++ b/sys/compat/linuxkpi/common/include/linux/seqlock.h
@@ -99,7 +99,7 @@ lkpi_write_seqcount_invalidate(seqc_t *seqcp)
 static inline seqc_t
 lkpi_seqprop_sequence(const seqc_t *seqcp)
 {
-       return (atomic_load_int(__DECONST(seqc_t *, seqcp)));
+       return (atomic_load_int(seqcp));
 }
 #define        seqprop_sequence(s)     lkpi_seqprop_sequence(&(s)->seqc)
 
diff --git a/sys/sys/atomic_san.h b/sys/sys/atomic_san.h
index 06c6c98ec8a8..9a82ff6762c6 100644
--- a/sys/sys/atomic_san.h
+++ b/sys/sys/atomic_san.h
@@ -266,8 +266,7 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX);
 #define        atomic_fcmpset_rel_ptr          ATOMIC_SAN(fcmpset_rel_ptr)
 #define        atomic_fetchadd_ptr             ATOMIC_SAN(fetchadd_ptr)
 #define        atomic_load_ptr(x)                                              
\
-       ((__typeof(*x))ATOMIC_SAN(load_ptr)(                            \
-           __DECONST(volatile uintptr_t *, (x))))
+       ((__typeof(*x))ATOMIC_SAN(load_ptr)((const volatile uintptr_t *)(x)))
 #define        atomic_load_acq_ptr             ATOMIC_SAN(load_acq_ptr)
 #define        atomic_load_consume_ptr(x)                                      
\
        ((__typeof(*x))atomic_load_acq_ptr((const volatile uintptr_t *)(x)))
diff --git a/sys/sys/seqc.h b/sys/sys/seqc.h
index 6472c2e3cfd7..17854b6f4adb 100644
--- a/sys/sys/seqc.h
+++ b/sys/sys/seqc.h
@@ -78,14 +78,14 @@ static __inline seqc_t
 seqc_read_any(const seqc_t *seqcp)
 {
 
-       return (atomic_load_acq_int(__DECONST(seqc_t *, seqcp)));
+       return (atomic_load_acq_int(seqcp));
 }
 
 static __inline seqc_t
 seqc_read_notmodify(const seqc_t *seqcp)
 {
 
-       return (atomic_load_acq_int(__DECONST(seqc_t *, seqcp)) & ~SEQC_MOD);
+       return (atomic_load_acq_int(seqcp) & ~SEQC_MOD);
 }
 
 static __inline seqc_t

Reply via email to