From nobody Sat Feb 17 21:32:40 2024 X-Original-To: dev-commits-src-branches@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 4Tchpw3zYyz59lD5; Sat, 17 Feb 2024 21:32:40 +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 4Tchpw1vnQz4gk1; Sat, 17 Feb 2024 21:32:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205560; 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=54QwJ03fCgUlSXreMJDo8e6Osa/iqYgiUjqMFgmOeTc=; b=AhryF3LbmVpExs2SEEqYU5WBShsvIWOi/4l3B0Gr5LQIGEIWP5YNNg/M2ROXbSE45t7Ww+ xyJxX8QGLRP/hiAYkhgT7QQ9gk3llWAX2KpZVAYC179gx2BvNl9rz+KAPbZJuQJ05Uucad qb4+0WHgDI0ApImpwlsHJ28QERxMxe8gdGPvUgaSfxs0NF8Lwd5zTMEaX7BHdQoI58PFqU lQtbw/OG9AYIKKrNdTmM9NECblAbGGZUfxXuDl0VOkg4tmdVmZNiWHPZLw0JK+IWC0wXjN G9jpFyQfBwFYQzMeIUR5J/rwI4CL/8NgxfhWs6KDbCcocKMQrXyYCdC8C7fvxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205560; 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=54QwJ03fCgUlSXreMJDo8e6Osa/iqYgiUjqMFgmOeTc=; b=TP1eyPI4mjyZeEC846mzsrrlVu4OD843NR9Tsn3EL2Og8zLwa3jA9z058rEAoJ+WvZbMkT yY6upgic6adXNs3EPP7xGW3e2EZOqGBDFHRmQL9ut5simxY8fiTuABBoCMCs/pX7CYCvg6 glor5ytYx9wJDCaRObPK4PvG4xQmKsBigjH1jrKFsLfCDPAiDXBa/t1yWghQGy6o9McfG8 /FAQCcMeIxIO/sS5jBrkJE6Wydms/TXsuiGhqkRKAnLwxBy2zWWbF+srGQ1w5yLV7WAvck SY1rFb1xkFJsOaLPgQ5NqYCspcAcAjKB0ipcuiKnDihwIVZDRwsdO0I4k4abBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708205560; a=rsa-sha256; cv=none; b=jxMw4JbvNjb8ZPMKtdbN3soclHKqyFqfSEnpG+7ra7qKmVBVWhd5XYM6W/LPWeXQtNruix mAYWxuALlrnuwyCvAkdQ5DMalGPTPN2NaSsX+G7H1QL1XHgbamk+NImEFTMKHkKc5WosKz v2FEKtZj5OsW8c3JV8jYTojpODynbSaWsKbwqLuAPw+ZCqxIzyMirvNZyOP3zdR44XdBkj PZB0ATABX/Uo7EyXH2ZMZon9xHqeB6R6YDnGeQtV+q3mhQ7nnTVikuT2vgQu1ZFUVkhfBK ZrcKPqpMkcImH+3eLlX9Eo79mcvn1tjBjhOJmjJArPNolAWE85G1mju4Bp9TfA== 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 4Tchpw11rWzPZS; Sat, 17 Feb 2024 21:32:40 +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 41HLWeon019995; Sat, 17 Feb 2024 21:32:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HLWeqm019992; Sat, 17 Feb 2024 21:32:40 GMT (envelope-from git) Date: Sat, 17 Feb 2024 21:32:40 GMT Message-Id: <202402172132.41HLWeqm019992@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: 0fef6cb7299f - stable/14 - linuxkpi: Add `list_for_each_prev_safe()` in List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 0fef6cb7299f541e1b94b84d2b9a9225133b9672 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=0fef6cb7299f541e1b94b84d2b9a9225133b9672 commit 0fef6cb7299f541e1b94b84d2b9a9225133b9672 Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 21:53:21 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-02-17 20:58:35 +0000 linuxkpi: Add `list_for_each_prev_safe()` in [Why] The amdgpu DRM driver started to use it in Linux 5.18. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43021 (cherry picked from commit b723bcd05a991d446491e914f2b9f35e66227398) --- sys/compat/linuxkpi/common/include/linux/list.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h index a27abedc55b0..ca103a670109 100644 --- a/sys/compat/linuxkpi/common/include/linux/list.h +++ b/sys/compat/linuxkpi/common/include/linux/list.h @@ -225,6 +225,11 @@ list_del_init(struct list_head *entry) #define list_for_each_prev(p, h) for (p = (h)->prev; p != (h); p = (p)->prev) +#define list_for_each_prev_safe(p, n, h) \ + for (p = (h)->prev, n = (p)->prev; \ + p != (h); \ + p = n, n = (p)->prev) + #define list_for_each_entry_from_reverse(p, h, field) \ for (; &p->field != (h); \ p = list_prev_entry(p, field))