From nobody Wed Dec 13 18:28:46 2023 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 4Sr3sB4b2Yz547lR; Wed, 13 Dec 2023 18:28:46 +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 4Sr3sB3wgWz4K6L; Wed, 13 Dec 2023 18:28:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492126; 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=64aO1NzkJtEZr4pRYm4JV7M6MM8NM3gwZEZUNvdWMFM=; b=F/MuJrdW/LFj64l+OLssLyipNLpQzminTn2zDEfEmDCUH9cZ9PEaP65y1oawkREIJrJUa7 fXGXIQS6ZQn3/cO9Y57zWYrQ3i2Y6NHWbJgFs291RbW4Bx8r09vvRp8GEuUhw3UnXhZcbK GtoAlGMpInwZZKugE6R+pt2TxFAFa4X7KFniugjYTPGmOZMvXP4vFRK7evrbS08Hxw/s1Z neNmcDtw0+OJ9BvPZAAYGOjzmqf8llJX3NgeU9gpRtgCnFh8TGAFHShRuBTC7+b7LHsJ4R JgBMunuBLgsDEmLlUVFvM1mSolUmBvxjOoL+4PGyl3OEMbL6kRd8RdMVZde92A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492126; a=rsa-sha256; cv=none; b=lEaOkQPjisFtyZOmySSzv5E7si1e0ndby38F7YcWQiig5Rxzd7xpMBzQFxeKCFnrBt31VW 4gyaV431XAz4AxY3eYcZICul0NGOWO9MW2zX1r99zob517xCp20zEmK3bxkMQsOsDR4fh1 H4kvrCYZB6XvTPa5xJanepN4ZWDnaav5uwHNleSAP353TLV75Zaa5QQtS8OfqZ0J3UzKCk It+WwH9Ot2syS0vIJ5gbaKZFTt4qtNZuZWUDkTgjzRzUqGISMyP951jZUWBYUtaOEFC90Q hHsMz0vqZKiidKlY1+FPU010F/vbp29TiNyUPkzRqpTcjU6WWflG+yyzKB+m+A== 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=1702492126; 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=64aO1NzkJtEZr4pRYm4JV7M6MM8NM3gwZEZUNvdWMFM=; b=ohdf7XEEoqkQkzNNawBHM6cjDAIaQecHou9gRjFOs36so0i1saBVQWJ8TXBb4iLH0RgwFY PemYrZm42eWNMjBA8mqVrEfac8S+BoClp7LMDYXM3T0/nwq5Oii0yNaHF7sN8VrLhwIho/ CAMxYOgIDNjm672ieY8C2ifw9cTkrNHtPQ5jbkhFjlYYxYQyuos92XeQWndom9PdwZSWU8 G7ifINpBOlkAsOEC8vXT9GJsmeuKi92zAAYFSWmHhdodqI2y6JL0wl2J1PvNP2U8dNFKRD oUD7E9Nus4EbPynpjYy7QqvzH6BikGAwaCMm+Zm+ZbxqGxbvEPTEBoRuDQFkeg== 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 4Sr3sB32mgz18Nj; Wed, 13 Dec 2023 18:28:46 +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 3BDISkes018983; Wed, 13 Dec 2023 18:28:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISk3w018980; Wed, 13 Dec 2023 18:28:46 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:46 GMT Message-Id: <202312131828.3BDISk3w018980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: b723bcd05a99 - main - linuxkpi: Add `list_for_each_prev_safe()` in 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b723bcd05a991d446491e914f2b9f35e66227398 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=b723bcd05a991d446491e914f2b9f35e66227398 commit b723bcd05a991d446491e914f2b9f35e66227398 Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 21:53:21 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:46 +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 --- 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))