From nobody Wed Aug 28 18:55:48 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 4WvDBr3qQFz5MXyT; Wed, 28 Aug 2024 18:55:48 +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 4WvDBr2kb4z4mVD; Wed, 28 Aug 2024 18:55:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724871348; 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=fSbNWF35y1yjHhhqxwH8i7B9v6lUJhOPcewJDPCg2RI=; b=in80SNGh6IuRle2mPNROxDJbRBOP/ottlx8wQiDHUSFjk6IYkjewA+pQrsa4fVZQ3ELChp pnrYnSxVlDeeUb769wEnfTmBSry1fYuTz5CFhsGglrYVH7ACoVQqaouCgCfN9h41KPKQIx wWYHS6y8b99nmbatrtyoilFlJxhsu5ptOJfIyNQtJk8QhD8U9ILc4XtssCm7N2/LqhkwIO 0qY75nKXFyOpzz/oFkpKmzpZxnkvMI+tWfe1g2buPyvA7pp/y2bJvrIDrqe+/vIO0Oi5GR lctMs/9L3DaKua3TZ8zPrqhLs1USKRWBWJ9bmuVHm7awIAAbs+OzG5mwF98Vqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724871348; a=rsa-sha256; cv=none; b=a+pbEHtzh+Z41+OX2Lt0wPxe08tuBo3Ji2iiA00rvhoF2dp24a3whV0TM/I7eXGqKcM1yr 045sR+NxsjqRcalxmGfm8l0QR8wqCs5bWxKKvsMtRY0ttLQUWintPpJPsDYNQ9tUMwFcJ1 Tax554V5JCTnMxjB2oE5xzbfL6zJhcTZdMWVZaW01xZB6CRhp1m/osZOAZ2ezu5KFrHe+X Q5cJs8imPCSID8BCA8UsbzhIDpuTJKA3586uyW9AB6N3kCLouphA/zc40xy/UzN3f5PRaC /I8dCqR0Ywm5GPJ4VPWylSpwKYSkwuZGbHeGQSm77qcaGMgsMuDMCUWYjjlCbQ== 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=1724871348; 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=fSbNWF35y1yjHhhqxwH8i7B9v6lUJhOPcewJDPCg2RI=; b=rzpY/C/QtbMcDd8V9woIp929k8oCoXYoNsjZqAyP7QMFEph2EtRnLHVWzIp7H3VcBqkZq8 Ob15m+z3pYeNoLfai0S9rQqdhmYKQGcgqzlyypnW/HYG7/ylMynUBqeYV0K5GfZ1hq6qvs 2gzavn+RN7jW5V+2rvN36j4KtZ2E+MtLyrOa0mnEkj8yhxOyPa6uLtbksf8TL2wczZAM6T oc+nnJW2w5EirFevk61dpT0d7/QUhsYaXkqsaDX0ofvHNm80gO9lKHL7+7mlgGGnRvjCv9 PUyAc1ejr0dadWR5DgVOJBKFV+q9YnyTR6ZDYwcsP5Y3oVWtLtIfVXlE1GA8dA== 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 4WvDBr2Kk2zm0b; Wed, 28 Aug 2024 18:55:48 +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 47SItmxU024357; Wed, 28 Aug 2024 18:55:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47SItml1024354; Wed, 28 Aug 2024 18:55:48 GMT (envelope-from git) Date: Wed, 28 Aug 2024 18:55:48 GMT Message-Id: <202408281855.47SItml1024354@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c7a7e997d25d - main - 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/main X-Git-Reftype: branch X-Git-Commit: c7a7e997d25d0b33769252d002b16839c864c83d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c7a7e997d25d0b33769252d002b16839c864c83d commit c7a7e997d25d0b33769252d002b16839c864c83d Author: Mark Johnston AuthorDate: 2024-08-28 18:51:06 +0000 Commit: Mark Johnston CommitDate: 2024-08-28 18:55:39 +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 --- 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)))