From nobody Thu Sep 05 13:46:14 2024 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 4X00xz0Cnyz5W4rb; Thu, 05 Sep 2024 13:46:15 +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 4X00xy6cDXz4R6R; Thu, 5 Sep 2024 13:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725543974; 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=Ap+mCZw7exj5xekXuDnY64HJSm22CdV9MKkUPnzqOLM=; b=ssKES+txhCaWx6iR2tI4b2RR4nSr8q7rQNHZ8fXG42qieS1nzkvsw5Gkg6uIIlK2UwSzg9 2zreskfi0ewD3Irh7mHsyqiFpRiVlP71h6xcUa3q0knhJ0Eiuhdiou00yFxukSgyc+gwKE aefh6RDU/YOT4v/c5rLyfZGgiyYeCzvLf7Umc+25R80RYVCUnIk2wK8sUMDFzKoGe79AZI sLzRgjxfojG6q72rrwGeJRa5u8VVRwQvRGJfc9QjshbUhRv61A9lYM/eIzigVpDsaalKND oK1sI/lXCWsKZ56OPV+2P3y3E43F4Vn/OOV045OOhrxmbloeC1NjGVGaCkJTuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725543974; a=rsa-sha256; cv=none; b=yaKf+MAKWdJvNC+4rN9ELOrWYhb7GJH4+Y3m/Sd7yyrEit2NCTOdtMZklU3xG6e/9fWG0j MyJJIaNNLTYYY6OLrn+dQSqo5K89nVV0aMoDtuIjk4HN0W7z4EvtGnaoIklNw2HcVkEiCP w/saKZ6QIMgY/su1Bjd8mlIIK0Z+O/Gk3qv0c2xYMIcisiX94DJb8Lc+AaxAgRjhc+u2PD JupfT4y/ohme404M5ARtIuCfh3wi7t7C+0gH+N/WbwVM83ApE1lJBIdUvaAjbkvPttwaUN rSuvnMcWxkifTRJ+9CgD6hronJ4mCNjMBLxC5wT/Yhmjut2YR4zZWbg/5QoITg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725543974; 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=Ap+mCZw7exj5xekXuDnY64HJSm22CdV9MKkUPnzqOLM=; b=f/umcDeTiLSGK8R8ldLWIDpvq5ejFg5qye+bF0Ovk3KuoDxN8sNAx1nLjtXy0UxLOznAkQ Xnxl35snrvVx63BufRY/QXpGVXwSbo8I+4OvExjAHfkFYr/xXTe2jicb68QG8q2BBYMOQu TiluoAiCtpypZkR9CqiETP02oizXK6Ud289+GKVL76n1t1fiVkjkdnPhzBv/9VtF8vWLKm c3aNq1jsibZJtKIHN2wOAB7G3rtAmYOsQAl5mYXwFmEz93c3rD+eX+Yb8iCf9EoAfNH3CH DY7E3NNnCo9XIQnPblq2ZuYr4xXZbdk12dq1j7CJNXsumWQwBpz6RMS8oyHGXA== 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 4X00xy5xhNz18vh; Thu, 5 Sep 2024 13:46:14 +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 485DkELN065135; Thu, 5 Sep 2024 13:46:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 485DkES4065132; Thu, 5 Sep 2024 13:46:14 GMT (envelope-from git) Date: Thu, 5 Sep 2024 13:46:14 GMT Message-Id: <202409051346.485DkES4065132@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1e999a3ae1ac - stable/14 - atomic: Avoid casting the return value of atomic_load_ptr to void HEAD branches config description git-daemon-export-ok gl-conf hooks info objects packed-refs refs 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1e999a3ae1aceaaf84add14461243afe8ff45e39 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1e999a3ae1aceaaf84add14461243afe8ff45e39 commit 1e999a3ae1aceaaf84add14461243afe8ff45e39 Author: Mark Johnston AuthorDate: 2024-08-28 18:51:06 +0000 Commit: Mark Johnston CommitDate: 2024-09-05 13:44:00 +0000 atomic: Avoid casting the return value of atomic_load_ptr to void * Otherwise a cast is needed to load a uintptr_t value. Fixes: e1f4d623779d ("rangelocks: remove unneeded cast of the atomic_load_ptr() result") MFC after: 1 week (cherry picked from commit c7a7e997d25d0b33769252d002b16839c864c83d) --- sys/sys/atomic_san.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/atomic_san.h b/sys/sys/atomic_san.h index eb6913296a45..ef81b4b7c51e 100644 --- a/sys/sys/atomic_san.h +++ b/sys/sys/atomic_san.h @@ -266,7 +266,8 @@ 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) \ - ((void *)ATOMIC_SAN(load_ptr)(__DECONST(volatile uintptr_t *, (x)))) + ((__typeof(*x))ATOMIC_SAN(load_ptr)( \ + __DECONST(volatile uintptr_t *, (x)))) #define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr) #define atomic_load_consume_ptr(x) \ ((void *)atomic_load_acq_ptr((volatile uintptr_t *)(x)))