From nobody Wed Jun 19 20:58:10 2024 X-Original-To: dev-commits-src-main@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 4W4GDL4rz9z5Nq5d; Wed, 19 Jun 2024 20:58:10 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W4GDL21hKz4SNL; Wed, 19 Jun 2024 20:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718830690; 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=YkLngRjxAY5/f5DcNdwBEQiWOxVoJTsz8UkYSc+DaAY=; b=XT/V7d+DO+Qir6d6Sh8+iCk8f2xxqyfGHrtEyohM9istIBGx652wHwiPAguzzT3gpgpagF VCb/lSZO3gQFyh/b9fhEyUDF0ZOcJ/c6Yj7OPYvyZezmE0UsCxBnYk+WV3pv59ffksVmD3 qRl69LG05xaFoaV2+nk6bjITfO0EvclulStFi+Ib3eP1brLfC3rzDvJJ4J5hDERGdZ3yGB 7ccIIk1TuJ4scStU/B8MiVASFi+yHECp7iuY1QvmT29tETHSa4OdkN39Mo1VqjvEVWzIYh fzVoQdMcZo8aPusFDBPHGYZUZblOZ4siEpqkIL98E1QuTJvVHcF2fDdTde5ZEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718830690; a=rsa-sha256; cv=none; b=qBZDAsxhix5h+rTchH9bfKgI17z4ooZOwLMGy4jOq6+5XuJ3op8B+bGCCH/2yiAdTQA/Mr OnggEy2DJ/yocZGBTjM1nRUItwayhD6JCJhS1kPMkLJudfbBU9zgDg5iPEDE2p0FVE0UqE nDfxIV+M3U7qHL5/63mh41WlwCOCW+zVHlqzyOcKQaFjfQlCJL4mcMJzvYgsOWU89HNCt/ xfx52+zIXiZRJ2mh6tWJjStiWvKQKO5Atr4zcPW6kfnubo4L4dSsWVqK+UiWzyi6SYD+aE DQ/u6Juj/DbecHaWMnmHfxmVM1UcKMnBekzafCLJBJJTOXB5pYhdlm0yzcHSqw== 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=1718830690; 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=YkLngRjxAY5/f5DcNdwBEQiWOxVoJTsz8UkYSc+DaAY=; b=vTod8LsbhuimZw6Wvykl5LVwcj4w+jYBz3TQBPDngIA7BbgCL9VtlFJ1/zRPVA350APIS0 zgcO/79DojRIeMPuifvJSiOpczToK7Yk6E2Mm+bikIkq7WSg5leQdDfumq73Xw1HpFn3V9 wICEhOv13gvpdQuqrsz4dhz2Eca28vHNndBtgn/HEFRZA1XoabTcRAfRAT0V+IGVeQXLhF YVJLNvsINUmDzEe1Vb2PvgtXp5mj6Tqn0RIasem42M5GflPHDkIy6A7GCC36IYKnjYJyif VF5Lm/f12df3JiRILIfz/dx5HFLRCmRQWHTCUJa3n4YBKYK1y8oOlYSRjobyZQ== 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 4W4GDL1dmFzxXS; Wed, 19 Jun 2024 20:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45JKwAMW036276; Wed, 19 Jun 2024 20:58:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45JKwAe7036273; Wed, 19 Jun 2024 20:58:10 GMT (envelope-from git) Date: Wed, 19 Jun 2024 20:58:10 GMT Message-Id: <202406192058.45JKwAe7036273@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: e5a7890dc00a - main - zfs: Use a statement expression to implement SET_ERROR() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: e5a7890dc00ac0b158498db92008f7c0b5970eac Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e5a7890dc00ac0b158498db92008f7c0b5970eac commit e5a7890dc00ac0b158498db92008f7c0b5970eac Author: Mark Johnston AuthorDate: 2024-06-19 16:01:54 +0000 Commit: Mark Johnston CommitDate: 2024-06-19 20:57:30 +0000 zfs: Use a statement expression to implement SET_ERROR() This way we can avoid making assumptions about the SDT probe implementation. No functional change intended. This was submitted upstream as https://github.com/openzfs/zfs/pull/16284 MFC after: 1 week --- sys/contrib/openzfs/include/os/freebsd/spl/sys/sdt.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/sdt.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/sdt.h index 2daa6de1af08..74e03fd5b956 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/sdt.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/sdt.h @@ -31,13 +31,14 @@ #include_next #ifdef KDTRACE_HOOKS -/* CSTYLED */ +/* BEGIN CSTYLED */ SDT_PROBE_DECLARE(sdt, , , set__error); -#define SET_ERROR(err) \ - ((sdt_sdt___set__error->id ? \ - (*sdt_probe_func)(sdt_sdt___set__error->id, \ - (uintptr_t)err, 0, 0, 0, 0) : 0), err) +#define SET_ERROR(err) ({ \ + SDT_PROBE1(sdt, , , set__error, (uintptr_t)err); \ + err; \ +}) +/* END CSTYLED */ #else #define SET_ERROR(err) (err) #endif