From nobody Sat Feb 17 21:32:42 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 4Tchpy5rFgz59kqx; Sat, 17 Feb 2024 21:32:42 +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 4Tchpy3vy8z4gkV; Sat, 17 Feb 2024 21:32:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205562; 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=HhJNiZkOCdAFTl9WNE5bZPNBRvUlkaGX01UIQhpG5pk=; b=S7gl/dPXBRr37nBltCA32jG//GYrZBbm6lAqi4gQVyOOQv7qj7sJP6CO6+78HWDrrhSLCR 5pW9CMI8v8sKXGcFutUMYTHkLKd71gGTy9UcgCWVHIRjD1wBrZxJjwxiZ0tj5DTihjrVy5 ++WT9uVquOcK29DUprvMx22M30uvh0agXySMwY1bpSvIJSMPvjlebm14yVqab/DRGe1K+3 OaC0wtEYz0bmiuMsyiRPf9+9o4aL8e8fmLcdjnF5s2dezmOTmG0dGpm3gLP2ccwjIJA8fx 87JEA5N6sPL4OP0zfDAWny9ElLnqvLhl3LoKCoR5O4FeWHDdqhpp1DP4tiPXog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205562; 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=HhJNiZkOCdAFTl9WNE5bZPNBRvUlkaGX01UIQhpG5pk=; b=RfafxNIYOp4qzPZtnuJK0Ni05qUPFN3TRHUu+nNwZ53kp9bj34Ez/CKoFd/X0b0ASO/8DV gVtcBl2D140d9e6DXgEG9w1pgb+hZ1N5mtb/2COMBmg0MHbIMAk1v9ahTiM1oSeeDqBx7E YRfo7uyFuPxpcYFgM+vZUbJyEkzlYinqEPsZFUPg1+1UA41vGdVipWS6MmjrMELdgrC/MZ dTkYuS8C03sOUxpOE/jIP0XZjIeNJ5bdQOIyien5XX3IMDv14CtX0JbVVcK3eXdfWkc3Cp eox28N7LX4yH8BuyI0roqrWdCCfXyMvn/YrrfsYpayPbnKkdEMU//wjLgi6JsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708205562; a=rsa-sha256; cv=none; b=Ga/ekARlS9l+vJGutpXT//LS5lws9tbcYy5ei4XucRJnnKso++KPKqnO38d4JgSPzQBNoP 5QZhtatf0qwo2dSFxfqvfpO3AJwua0NU/BDZ4ffBlO7AgDv4WoPZSHPNn3HskzUdnrWaZV fxuaMhwrMUdnjcvP7gtHuXUb+Yy+2z9my7fHYM+1jaIlrNCMeHgfggae36sneqOO++UtoH AOqu+V4QIaPAtgqYl5yPh9FyzDoc33TlXc9GfHxTjGgBHupFNVvqiuDliKNYb2Ofoh6kJO i0iZ5ha/ktm8KdF/01yfCCUbIy6e3dYsmts3BBzuUgDzwVK7UVaFkmnRfv6/lg== 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 4Tchpy31D8zPMC; Sat, 17 Feb 2024 21:32:42 +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 41HLWgU6020085; Sat, 17 Feb 2024 21:32:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HLWgqS020082; Sat, 17 Feb 2024 21:32:42 GMT (envelope-from git) Date: Sat, 17 Feb 2024 21:32:42 GMT Message-Id: <202402172132.41HLWgqS020082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 0b3e4b3cc9bf - stable/14 - linuxkpi: Fix `__ATTR_RO()` in 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0b3e4b3cc9bf1dda9d86636da02e6f8f96282d6f Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=0b3e4b3cc9bf1dda9d86636da02e6f8f96282d6f commit 0b3e4b3cc9bf1dda9d86636da02e6f8f96282d6f Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 21:57:24 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-02-17 20:58:35 +0000 linuxkpi: Fix `__ATTR_RO()` in [Why] The passed structure may not have a `.store` field. This is the case in the amdgpu DRM driver starting with Linux 5.18. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43023 (cherry picked from commit d752a5e82ac92603fadf82e7de75878e1f5d054a) --- sys/compat/linuxkpi/common/include/linux/sysfs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h index 8b4160453a3a..4a65095d9eb1 100644 --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h @@ -54,7 +54,10 @@ struct attribute_group { .attr = { .name = __stringify(_name), .mode = _mode }, \ .show = _show, .store = _store, \ } -#define __ATTR_RO(_name) __ATTR(_name, 0444, _name##_show, NULL) +#define __ATTR_RO(_name) { \ + .attr = { .name = __stringify(_name), .mode = 0444 }, \ + .show = _name##_show, \ +} #define __ATTR_WO(_name) __ATTR(_name, 0200, NULL, _name##_store) #define __ATTR_RW(_name) __ATTR(_name, 0644, _name##_show, _name##_store) #define __ATTR_NULL { .attr = { .name = NULL } }