* linux-next: build warnings after merge of the cgroup tree
@ 2024-08-01 5:48 Stephen Rothwell
2024-08-01 7:15 ` [PATCH v1] Documentation: Fix the compilation errors in union_find.rst Xavier
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2024-08-01 5:48 UTC (permalink / raw)
To: Tejun Heo; +Cc: Xavier, Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 2083 bytes --]
Hi all,
After merging the cgroup tree, today's linux-next build (htmdocs)
produced these warnings:
Documentation/core-api/union_find.rst:22: WARNING: Definition list ends without a blank line; unexpected unindent.
Documentation/core-api/union_find.rst:66: WARNING: Title underline too short.
Initializing union-find
--------------------
Documentation/core-api/union_find.rst:74: WARNING: Literal block ends without a blank line; unexpected unindent.
Documentation/core-api/union_find.rst: WARNING: document isn't included in any toctree
Documentation/translations/zh_CN/core-api/union_find.rst:6: WARNING: Title overline too short.
===========================
Linux中的并查集(Union-Find)
===========================
Documentation/translations/zh_CN/core-api/union_find.rst:15: WARNING: Title underline too short.
何为并查集,它有什么用?
---------------------
Documentation/translations/zh_CN/core-api/union_find.rst:20: ERROR: Unexpected indentation.
Documentation/translations/zh_CN/core-api/union_find.rst:21: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/translations/zh_CN/core-api/union_find.rst:40: WARNING: Title underline too short.
并查集的Linux实现
----------------
Documentation/translations/zh_CN/core-api/union_find.rst:51: WARNING: Literal block ends without a blank line; unexpected unindent.
Documentation/translations/zh_CN/core-api/union_find.rst:55: WARNING: Title underline too short.
初始化并查集
---------
Documentation/translations/zh_CN/core-api/union_find.rst:62: WARNING: Literal block ends without a blank line; unexpected unindent.
Documentation/translations/zh_CN/core-api/union_find.rst:66: WARNING: Title underline too short.
查找并查集的根节点
----------------
Documentation/translations/zh_CN/core-api/union_find.rst:81: WARNING: Title underline too short.
合并两个并查集
-------------
Introduced by commit
93c8332c8373 ("Union-Find: add a new module in kernel library")
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1] Documentation: Fix the compilation errors in union_find.rst
2024-08-01 5:48 linux-next: build warnings after merge of the cgroup tree Stephen Rothwell
@ 2024-08-01 7:15 ` Xavier
2024-08-01 17:06 ` Tejun Heo
0 siblings, 1 reply; 5+ messages in thread
From: Xavier @ 2024-08-01 7:15 UTC (permalink / raw)
To: sfr, tj; +Cc: linux-kernel, linux-next, xavier_qy
Fix the compilation errors and warnings caused by merging
Documentation/core-api/union_find.rst and
Documentation/core-api/union_find.rst.
Signed-off-by: Xavier <xavier_qy@163•com>
---
Documentation/core-api/index.rst | 1 +
Documentation/core-api/union_find.rst | 4 +++-
.../translations/zh_CN/core-api/index.rst | 1 +
.../zh_CN/core-api/union_find.rst | 19 +++++++++++--------
4 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/Documentation/core-api/index.rst b/Documentation/core-api/index.rst
index f147854700..e18a2ffe07 100644
--- a/Documentation/core-api/index.rst
+++ b/Documentation/core-api/index.rst
@@ -49,6 +49,7 @@ Library functionality that is used throughout the kernel.
wrappers/atomic_t
wrappers/atomic_bitops
floating-point
+ union_find
Low level entry and exit
========================
diff --git a/Documentation/core-api/union_find.rst b/Documentation/core-api/union_find.rst
index 38d63b16e5..0b3a86a52a 100644
--- a/Documentation/core-api/union_find.rst
+++ b/Documentation/core-api/union_find.rst
@@ -16,9 +16,11 @@ of disjoint sets. The primary operations supported by Union-Find are:
Initialization: Resetting each element as an individual set, with
each set's initial parent node pointing to itself.
+
Find: Determine which set a particular element belongs to, usually by
returning a “representative element” of that set. This operation
is used to check if two elements are in the same set.
+
Union: Merge two sets into one.
As a data structure used to maintain sets (groups), Union-Find is commonly
@@ -63,7 +65,7 @@ operation, the tree with the smaller rank is attached under the tree with the
larger rank to maintain balance.
Initializing Union-Find
---------------------
+-----------------------
When initializing the Union-Find data structure, a single pointer to the
Union-Find instance needs to be passed. Initialize the parent pointer to point
diff --git a/Documentation/translations/zh_CN/core-api/index.rst b/Documentation/translations/zh_CN/core-api/index.rst
index 922cabf7b5..453a02cd1f 100644
--- a/Documentation/translations/zh_CN/core-api/index.rst
+++ b/Documentation/translations/zh_CN/core-api/index.rst
@@ -49,6 +49,7 @@
generic-radix-tree
packing
this_cpu_ops
+ union_find
=======
diff --git a/Documentation/translations/zh_CN/core-api/union_find.rst b/Documentation/translations/zh_CN/core-api/union_find.rst
index e1b5ae88da..ac7eaa612f 100644
--- a/Documentation/translations/zh_CN/core-api/union_find.rst
+++ b/Documentation/translations/zh_CN/core-api/union_find.rst
@@ -3,21 +3,23 @@
:Original: Documentation/core-api/union_find.rst
-===========================
+=============================
Linux中的并查集(Union-Find)
-===========================
+=============================
:日期: 2024年6月21日
:作者: Xavier <xavier_qy@163•com>
何为并查集,它有什么用?
----------------------
+------------------------
并查集是一种数据结构,用于处理一些不交集的合并及查询问题。并查集支持的主要操作:
- 初始化:将每个元素初始化为单独的集合,每个集合的初始父节点指向自身
+ 初始化:将每个元素初始化为单独的集合,每个集合的初始父节点指向自身。
+
查询:查询某个元素属于哪个集合,通常是返回集合中的一个“代表元素”。这个操作是为
了判断两个元素是否在同一个集合之中。
+
合并:将两个集合合并为一个。
并查集作为一种用于维护集合(组)的数据结构,它通常用于解决一些离线查询、动态连通性和
@@ -37,7 +39,7 @@ Linux中的并查集(Union-Find)
https://en.wikipedia.org/wiki/Disjoint-set_data_structure
并查集的Linux实现
-----------------
+------------------
Linux的并查集实现在文件“lib/union_find.c”中。要使用它,需要
“#include <linux/union_find.h>”。
@@ -48,11 +50,12 @@ Linux的并查集实现在文件“lib/union_find.c”中。要使用它,需
struct uf_node *parent;
unsigned int rank;
};
+
其中parent为当前节点的父节点,rank为当前树的高度,在合并时将rank小的节点接到rank大
的节点下面以增加平衡性。
初始化并查集
----------
+-------------
初始化并查集时需要传入并查集实例的一个指针。初始化时,parent 指针指向自身,rank 设置
为 0。
@@ -62,7 +65,7 @@ Linux的并查集实现在文件“lib/union_find.c”中。要使用它,需
uf_nodes_init(my_node);
查找并查集的根节点
-----------------
+------------------
主要用于判断两个并查集是否属于一个集合,如果根相同,那么他们就是一个集合。在查找过程中
会对路径进行压缩,提高后续查找效率。
@@ -77,7 +80,7 @@ Linux的并查集实现在文件“lib/union_find.c”中。要使用它,需
connected = 0;
合并两个并查集
--------------
+--------------
对于两个相交的并查集进行合并,会首先查找它们各自的根节点,然后根据根节点秩大小,将小的
节点连接到大的节点下面。
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] Documentation: Fix the compilation errors in union_find.rst
2024-08-01 7:15 ` [PATCH v1] Documentation: Fix the compilation errors in union_find.rst Xavier
@ 2024-08-01 17:06 ` Tejun Heo
2024-08-02 3:33 ` [PATCH v2] " Xavier
0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2024-08-01 17:06 UTC (permalink / raw)
To: Xavier; +Cc: sfr, linux-kernel, linux-next
On Thu, Aug 01, 2024 at 03:15:23PM +0800, Xavier wrote:
> Fix the compilation errors and warnings caused by merging
> Documentation/core-api/union_find.rst and
> Documentation/core-api/union_find.rst.
>
> Signed-off-by: Xavier <xavier_qy@163•com>
This patch doesn't apply on top of cgroup/for-6.12.
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-6.12
Did I apply the wrong version of the union find patch?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] Documentation: Fix the compilation errors in union_find.rst
2024-08-01 17:06 ` Tejun Heo
@ 2024-08-02 3:33 ` Xavier
2024-08-02 18:58 ` Tejun Heo
0 siblings, 1 reply; 5+ messages in thread
From: Xavier @ 2024-08-02 3:33 UTC (permalink / raw)
To: tj, sfr; +Cc: linux-kernel, linux-next, xavier_qy
Fix the compilation errors and warnings caused by merging
Documentation/core-api/union_find.rst and
Documentation/translations/zh_CN/core-api/union_find.rst.
Signed-off-by: Xavier <xavier_qy@163•com>
---
Documentation/core-api/index.rst | 1 +
Documentation/core-api/union_find.rst | 6 +++++-
.../translations/zh_CN/core-api/index.rst | 1 +
.../zh_CN/core-api/union_find.rst | 21 ++++++++++++-------
4 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/Documentation/core-api/index.rst b/Documentation/core-api/index.rst
index f147854700e..e18a2ffe078 100644
--- a/Documentation/core-api/index.rst
+++ b/Documentation/core-api/index.rst
@@ -49,6 +49,7 @@ Library functionality that is used throughout the kernel.
wrappers/atomic_t
wrappers/atomic_bitops
floating-point
+ union_find
Low level entry and exit
========================
diff --git a/Documentation/core-api/union_find.rst b/Documentation/core-api/union_find.rst
index 2bf0290c918..6df8b94fdb5 100644
--- a/Documentation/core-api/union_find.rst
+++ b/Documentation/core-api/union_find.rst
@@ -16,9 +16,11 @@ of disjoint sets. The primary operations supported by union-find are:
Initialization: Resetting each element as an individual set, with
each set's initial parent node pointing to itself.
+
Find: Determine which set a particular element belongs to, usually by
returning a “representative element” of that set. This operation
is used to check if two elements are in the same set.
+
Union: Merge two sets into one.
As a data structure used to maintain sets (groups), union-find is commonly
@@ -63,7 +65,7 @@ operation, the tree with the smaller rank is attached under the tree with the
larger rank to maintain balance.
Initializing union-find
---------------------
+-----------------------
You can complete the initialization using either static or initialization
interface. Initialize the parent pointer to point to itself and set the rank
@@ -71,7 +73,9 @@ to 0.
Example::
struct uf_node my_node = UF_INIT_NODE(my_node);
+
or
+
uf_node_init(&my_node);
Find the Root Node of union-find
diff --git a/Documentation/translations/zh_CN/core-api/index.rst b/Documentation/translations/zh_CN/core-api/index.rst
index 922cabf7b5d..453a02cd1f4 100644
--- a/Documentation/translations/zh_CN/core-api/index.rst
+++ b/Documentation/translations/zh_CN/core-api/index.rst
@@ -49,6 +49,7 @@
generic-radix-tree
packing
this_cpu_ops
+ union_find
=======
diff --git a/Documentation/translations/zh_CN/core-api/union_find.rst b/Documentation/translations/zh_CN/core-api/union_find.rst
index a56de57147e..bb93fa8c653 100644
--- a/Documentation/translations/zh_CN/core-api/union_find.rst
+++ b/Documentation/translations/zh_CN/core-api/union_find.rst
@@ -3,21 +3,23 @@
:Original: Documentation/core-api/union_find.rst
-===========================
+=============================
Linux中的并查集(Union-Find)
-===========================
+=============================
:日期: 2024年6月21日
:作者: Xavier <xavier_qy@163•com>
何为并查集,它有什么用?
----------------------
+------------------------
并查集是一种数据结构,用于处理一些不交集的合并及查询问题。并查集支持的主要操作:
- 初始化:将每个元素初始化为单独的集合,每个集合的初始父节点指向自身
+ 初始化:将每个元素初始化为单独的集合,每个集合的初始父节点指向自身。
+
查询:查询某个元素属于哪个集合,通常是返回集合中的一个“代表元素”。这个操作是为
了判断两个元素是否在同一个集合之中。
+
合并:将两个集合合并为一个。
并查集作为一种用于维护集合(组)的数据结构,它通常用于解决一些离线查询、动态连通性和
@@ -37,7 +39,7 @@ Linux中的并查集(Union-Find)
https://en.wikipedia.org/wiki/Disjoint-set_data_structure
并查集的Linux实现
-----------------
+------------------
Linux的并查集实现在文件“lib/union_find.c”中。要使用它,需要
“#include <linux/union_find.h>”。
@@ -48,22 +50,25 @@ Linux的并查集实现在文件“lib/union_find.c”中。要使用它,需
struct uf_node *parent;
unsigned int rank;
};
+
其中parent为当前节点的父节点,rank为当前树的高度,在合并时将rank小的节点接到rank大
的节点下面以增加平衡性。
初始化并查集
----------
+-------------
可以采用静态或初始化接口完成初始化操作。初始化时,parent 指针指向自身,rank 设置
为 0。
示例::
struct uf_node my_node = UF_INIT_NODE(my_node);
+
或
+
uf_node_init(&my_node);
查找并查集的根节点
-----------------
+------------------
主要用于判断两个并查集是否属于一个集合,如果根相同,那么他们就是一个集合。在查找过程中
会对路径进行压缩,提高后续查找效率。
@@ -78,7 +83,7 @@ Linux的并查集实现在文件“lib/union_find.c”中。要使用它,需
connected = 0;
合并两个并查集
--------------
+--------------
对于两个相交的并查集进行合并,会首先查找它们各自的根节点,然后根据根节点秩大小,将小的
节点连接到大的节点下面。
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] Documentation: Fix the compilation errors in union_find.rst
2024-08-02 3:33 ` [PATCH v2] " Xavier
@ 2024-08-02 18:58 ` Tejun Heo
0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2024-08-02 18:58 UTC (permalink / raw)
To: Xavier; +Cc: sfr, linux-kernel, linux-next
On Fri, Aug 02, 2024 at 11:33:46AM +0800, Xavier wrote:
> Fix the compilation errors and warnings caused by merging
> Documentation/core-api/union_find.rst and
> Documentation/translations/zh_CN/core-api/union_find.rst.
>
> Signed-off-by: Xavier <xavier_qy@163•com>
Applied to cgroup/for-6.12.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-02 18:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 5:48 linux-next: build warnings after merge of the cgroup tree Stephen Rothwell
2024-08-01 7:15 ` [PATCH v1] Documentation: Fix the compilation errors in union_find.rst Xavier
2024-08-01 17:06 ` Tejun Heo
2024-08-02 3:33 ` [PATCH v2] " Xavier
2024-08-02 18:58 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox