From nobody Sun Feb 20 18:15:36 2022 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 48B2F19CEE53; Sun, 20 Feb 2022 18:15:39 +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 4K1ts50C3tz4Xlb; Sun, 20 Feb 2022 18:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645380938; 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=Yz1ewUe6yeIZMtKu/I3ZtcDsAKRV5Py98lWUDaOrCL4=; b=vn+yf5o7BOcSagBUAVdHZ1s3VSb9vybaRBEQ/9/eaMjliE1yl7g55Ju9F/9u1Jfg16Cv3c 0CFUAS8MK66eCvuHj8Oc5DJxdlFPx5bygHT161tz6/P+BzhJblMtYK7qraMXYAtqQdjX8X tdvan3mqR+CteiFuA5lsM1DTemn87QBr9GmhOHdWLr9EXM2PNYMobewsLEN0pflkIGrtjZ FJSTuoW0xSBemck14867jWR/2MreyHDEI115w/G8PGZiKWPDam5y0Q2RvkyVYiejyPpUFe OpjM2o8V/f7Y1qtpBLxpkvnYevL2/MJAUSwIazN1oxe6BvDnLtI9jfL+s/23fg== 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 5FDA1210FF; Sun, 20 Feb 2022 18:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21KIFa3S022904; Sun, 20 Feb 2022 18:15:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21KIFarr022903; Sun, 20 Feb 2022 18:15:36 GMT (envelope-from git) Date: Sun, 20 Feb 2022 18:15:36 GMT Message-Id: <202202201815.21KIFarr022903@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 5b4f2e816298 - stable/13 - LinuxKPI: add sizeof_field() 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5b4f2e8162987fa966b8ef0a537f49ae0caea286 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645380938; 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=Yz1ewUe6yeIZMtKu/I3ZtcDsAKRV5Py98lWUDaOrCL4=; b=FJDGHjLMcOYelSF5DzsQvJjSVYri5v3jjBv5JznAF8ptXVrJzAJmS1UB3yUWyaiXvpVmx5 K6JudA6nW5P+impKNaiSiMQRiRedT240aWb9RWfOxaBB3NVybeH3l02hIyDWFPICSD/jKI ubxiZ1oW8tOzuCL6FnFUdBCdFOpnF7IaD/S+kn3WK4T12XxyhGxksBeNT02PmLK+V/0FAl m0jrC2HNYYojO6cBQkVRXi255MD4v8gWSTAn8WG7/9gccQfq1MsUEkW185oEhg/Q/61frD FWXETJ3NamK4MCnA+T5NchHVa6An9x+NCG4/FYUv63Z8d5Gtzd4uTD6D8pVZRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645380938; a=rsa-sha256; cv=none; b=HmRSMA3Ic1uXC4jSrUyAF3RHBA2euUjalC8d/fu9oXB0dJUiYleEeWxq4GPxj9QX5iqQ8i 2A5fKo8SJdVh6jyLLA8NW/SGZWtQ8Yt0LVYq9l4fYX8x2kowwQbh9e2Z8ToB6t5qjd8kip c5/1JYHRlsyY75B2KuHigEp9J2BPKRSKY2GUD1lWVqI9E2cBKDbER3LmBXA6U9vHVU58VI 3osHaIjxpjrSVy+8gOvYh68rZdF+QtGqrdmWHYIA3sFOzmSJ8WUTjV3iPok4x8waMLEt+Q UN/9uowEQ9fCb90UCiHplIqjL3nwzEKYb1+Pv84DYhBGgPZm0qBNjsN1iQEBjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5b4f2e8162987fa966b8ef0a537f49ae0caea286 commit 5b4f2e8162987fa966b8ef0a537f49ae0caea286 Author: Bjoern A. Zeeb AuthorDate: 2022-02-09 11:46:15 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-02-20 16:24:22 +0000 LinuxKPI: add sizeof_field() Add sizeof_field() to linux/compiler.h needed by a driver. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D34226 (cherry picked from commit e5b95b220135bba90154c9c27803f54bf1a75548) --- sys/compat/linuxkpi/common/include/linux/compiler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 1f2edecbaee7..87a37228736f 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -111,4 +111,6 @@ #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) #define __must_be_array(a) __same_type(a, &(a)[0]) +#define sizeof_field(_s, _m) sizeof(((_s *)0)->_m) + #endif /* _LINUXKPI_LINUX_COMPILER_H_ */