From nobody Wed Jun 12 16:41:18 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 4VzrsD4lq6z5N3B1; Wed, 12 Jun 2024 16:41:20 +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 4VzrsB48PZz4ghd; Wed, 12 Jun 2024 16:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210478; 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=GjKXSYCqRRrluJjXHjbZmerOdGBnpwm9Jxd5gIrq8GA=; b=RLDVMFjHl2F9Y+fwOdUPph7An0owGhsjSRp1p9IWoizkcfpXsvG18Rz+breR3Y3awqfxDp bEN90bk54YEooW3mPwclppH4AhdLcaAF/3qa8w4oXhIkqCMISexV3f/2UD76uQ4uyY1D3c h2yQPHHFJ6uY1ylfj9OEM/e9ZZDak1pvWVhMGOPbMB2A3g+KWwREFnRrtHpkot7xdcgBJf YqjXQdH7ywH67A1fqDuYB6bTGa47bsB0lQeXBzgnEnyJWTmDq+P2gFfaJ9pDQDI+YFt6Zr OkYzZoUtEwj+hkYseoI5jkkrQWWn5+kTBkLK8GZYDu6pA4ISnyuxYR6U5XTylw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210478; a=rsa-sha256; cv=none; b=fbCCLBKQymg3vz0z2P16+ZPg3B6QxBRj1AIHykQXy/wzqZSd9kYhMz5wAy3fSEnxbaRvuK mZWgDCsEkEGAxcmn+Rj3qcV9c2rrmSqeXgLmGdVk+tyJ/iCGySO98o3UjBpZZDN5IqRPNl 9HMfq/QnqWsqAfVhsNaHrKs4PyUdP4wPwHFRfY7IfgKiUmzwUQzAbkJnJ5rY/vmj8RlAvN hih46yh/eIEo1HJx00Af08MihnNnmVBPKxFp74SYpxUF/HpoH+tDYIfsNkmm+8EZpoQRCf /qgU6htcqka6Anlxf5FN7ACQbSiJDJHk1oVq1Q/bhaNeKbG1VAQYjp19/c92CA== 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=1718210478; 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=GjKXSYCqRRrluJjXHjbZmerOdGBnpwm9Jxd5gIrq8GA=; b=rOg31O5Y3sg1W84mTKCzC04/KgGbhpQoReQJi1Ihx1BuJypAN/a5NPVYmXYxxfp+piVydM QfkwPz36wdKcMZkexQqi5Z22kTBvtgZ3uToejX4CB8JS+U4x7E0KSnuxnatW6yMRArguGs PJLW6ia8MoNAQNBkS/tcX3MrQhVIyoX1h4zMPvMcWEXWh+jb4/mlD47DW373r4VRDaLpx8 StF9oPlcNKLivo/lkixmZXSG8+WnH3v0QMFKy87jWuKF0V/+enkW5E9ObwJtKF/Xd1zFB2 +EyBZuR0HiID49dk6Vntn8vBKxYZRbJdDHlMfmo31G/R1jzehf0OQ3ooajFvRg== 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 4VzrsB3f7Mz10nV; Wed, 12 Jun 2024 16:41:18 +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 45CGfI90046479; Wed, 12 Jun 2024 16:41:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfIf5046476; Wed, 12 Jun 2024 16:41:18 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:18 GMT Message-Id: <202406121641.45CGfIf5046476@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: c8cf6a7706a0 - stable/14 - LinuxKPI: add FIELD_PREP_CONST() 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c8cf6a7706a090a821fdbc77d5b9b0a6474c8473 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c8cf6a7706a090a821fdbc77d5b9b0a6474c8473 commit c8cf6a7706a090a821fdbc77d5b9b0a6474c8473 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:40:26 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:37 +0000 LinuxKPI: add FIELD_PREP_CONST() Add FIELD_PREP_CONST() like FIELD_PREP() without any extra checks likely expected on this version in Linux. This is called by an updated wireless driver. Sposnored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45180 (cherry picked from commit bb025df257386c5d1087b652e8ed951bceb89862) --- sys/compat/linuxkpi/common/include/linux/bitfield.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h index a2020d247489..8a91b0663f37 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitfield.h +++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -131,6 +131,10 @@ _uX_replace_bits(8) #define FIELD_PREP(_mask, _value) \ (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) +/* Likely would need extra sanity checks compared to FIELD_PREP()? */ +#define FIELD_PREP_CONST(_mask, _value) \ + (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) + #define FIELD_GET(_mask, _value) \ ((typeof(_mask))(((_value) & (_mask)) >> __bf_shf(_mask)))