* [merged mm-hotfixes-stable] list-add-hlist_count_nodes.patch removed from -mm tree
@ 2024-02-22 23:39 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-02-22 23:39 UTC (permalink / raw)
To: mm-commits, tkjos, surenb, mingo, maco, kent.overstreet, keescook,
joel, jani.nikula, gregkh, elver, colyli, cmllamas, brauner, arve,
andriy.shevchenko, pierre.gondois, akpm
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2288 bytes --]
The quilt patch titled
Subject: list: add hlist_count_nodes()
has been removed from the -mm tree. Its filename was
list-add-hlist_count_nodes.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Pierre Gondois <pierre.gondois@arm.com>
Subject: list: add hlist_count_nodes()
Date: Thu, 4 Jan 2024 17:49:33 +0100
Add a generic hlist_count_nodes() function and use it in two drivers.
This patch (of 3):
Add a function to count nodes in a hlist. hlist_count_nodes() is similar
to list_count_nodes().
Link: https://lkml.kernel.org/r/20240104164937.424320-1-pierre.gondois@arm.com
Link: https://lkml.kernel.org/r/20240104164937.424320-2-pierre.gondois@arm.com
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Carlos Llamas <cmllamas@google.com>
Acked-by: Coly Li <colyli@suse.de>
Acked-by: Marco Elver <elver@google.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Cc: Martijn Coenen <maco@android.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Todd Kjos <tkjos@android.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/list.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- a/include/linux/list.h~list-add-hlist_count_nodes
+++ a/include/linux/list.h
@@ -1195,4 +1195,19 @@ static inline void hlist_splice_init(str
pos && ({ n = pos->member.next; 1; }); \
pos = hlist_entry_safe(n, typeof(*pos), member))
+/**
+ * hlist_count_nodes - count nodes in the hlist
+ * @head: the head for your hlist.
+ */
+static inline size_t hlist_count_nodes(struct hlist_head *head)
+{
+ struct hlist_node *pos;
+ size_t count = 0;
+
+ hlist_for_each(pos, head)
+ count++;
+
+ return count;
+}
+
#endif
_
Patches currently in -mm which might be from pierre.gondois@arm.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-22 23:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-22 23:39 [merged mm-hotfixes-stable] list-add-hlist_count_nodes.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.