From nobody Mon Jan 20 15:50:45 2025 X-Original-To: dev-commits-src-all@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 4YcFDQ0053z5kGgq; Mon, 20 Jan 2025 15:50:45 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YcFDP5jgGz3NYS; Mon, 20 Jan 2025 15:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737388245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=32pe9Pf499pgiN9nnnVTwCFK8Sm61u3H/JR7JDixdH0=; b=YvBh23BKJ9c2n+DxNfwJjZ9FcXCnfS63Mq61vcBcv2NVYZvv2h+IICX/SwMRyolQbopLum hzsTdsRY5bDaadJ5JnMmnRkD/RY88nOAJ1iiV+JrtoIoNKIZ1aNGq038OhJwsPmc7y91fV ojlZvlmmyqwkc51cWDjA1gn3nA9O7zf6VcLLJ9EijWe6UmJrkdbIrtFs663wmZkggiViNd DnDk6dFEZYWA1Bf5NiBijSSfHt+9I47em9YT287J7VZKnlQ74e/pkA+c6RlinRXoKJIHBt UaPZqDEXTiI2ZEYnBNuhqonL0gwoECXMBhiea0oMV7tnfClRazuf/bVNt1bCaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737388245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=32pe9Pf499pgiN9nnnVTwCFK8Sm61u3H/JR7JDixdH0=; b=aO3FMjDGKOu5tmvoH5zTN6PAFZaR5OUpin6LSWFYLAdfsA6iPRYn1GLLcLYaWmNJlGiH55 YitFaoSJ1a7pFhfmhTOSsazpQ6CQPzN0tlSJHhGQqsqyK5G6qsTKTw616VdOOJS8w4qmek KYC4Q7Fn/0klr+xEMq1geM0/dEBTr7pbuex6Flt9SlhYlcA98+fErKhn/A8PkDZKrNN11K Gx7SzNQZqqIBw9X2Vn8Zrzylm4VRt8TcZvbJnajZPKo/ZlHG75VB0z2bGNixCILBCTOYOd K3fDfKC3qc9z2YFLSp6Q5GHpjoYhYGAoBXjj/IbIUUdPiTgo4lD04yR6eFrcWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737388245; a=rsa-sha256; cv=none; b=QMf4lGpaauWxjcEQELTFsA/jvMikz3k0fgCZHA6fig4h/1bld+yuDUams9m8pVIkA8+QHx vaH4jak2I/t35pcn19Fd66vUkmCVa9jinX8btAoZDWlASseIIAtv3kil3tMcBtH4b43SfZ REfChumm2cilnzqUCiXuLJx5Qm4yKt2J+8gYZCqzNskKpA996bxjrqJ87McBGs7bpxOTAV fpz2qH3mj78nmJH4enq63+vI+kh7YaTt417+60fI72Gnn54dyi5gm6DXeENlTvRn7t2Zwy zhAycAqSXFpksR0fnwu3pdYPgHvuApiKWuL8I76mppjBXfyKoIEA1yt1QAFDPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YcFDP5DdQzBDh; Mon, 20 Jan 2025 15:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KFojHX047902; Mon, 20 Jan 2025 15:50:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KFojnA047899; Mon, 20 Jan 2025 15:50:45 GMT (envelope-from git) Date: Mon, 20 Jan 2025 15:50:45 GMT Message-Id: <202501201550.50KFojnA047899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 62af5b9dc620 - main - atomics: Constify loads: Remove now superfluous uses of DECONST() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62af5b9dc6205289a0ace964d060fba64e71ef28 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=62af5b9dc6205289a0ace964d060fba64e71ef28 commit 62af5b9dc6205289a0ace964d060fba64e71ef28 Author: Olivier Certner AuthorDate: 2025-01-20 14:28:37 +0000 Commit: Olivier Certner CommitDate: 2025-01-20 15:49:52 +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 --- 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