[merged mm-stable] mm-mm_sloth-add-comments-for-mm_slot_lookup-insert.patch removed from -mm tree

Andrew Morton <[email protected]>
Newsgroups org.kernel.vger.mm-commits
Message-ID <[email protected]>
The quilt patch titled
     Subject: mm/mm_slot.h: add comments for mm_slot_lookup/insert
has been removed from the -mm tree.  Its filename was
     mm-mm_sloth-add-comments-for-mm_slot_lookup-insert.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: xu xin <[email protected]>
Subject: mm/mm_slot.h: add comments for mm_slot_lookup/insert
Date: Tue, 14 Jul 2026 09:28:15 +0800 (CST)

mm_slot_lookup() and mm_slot_insert() are the only helpers in this header
that are implemented as macros rather than static inline functions.  This
may look inconsistent without explanation.

Explain they must be macros because hash_for_each_possible() needs the
table as an array (for sizeof), not a pointer.

Link: https://lore.kernel.org/[email protected]
Signed-off-by: xu xin <[email protected]>
Reviewed-by: Barry Song <[email protected]>
Acked-by: David Hildenbrand (Arm) <[email protected]>
Reviewed-by: Qi Zheng <[email protected]>
Reviewed-by: Lorenzo Stoakes (ARM) <[email protected]>
Reviewed-by: SJ Park <[email protected]>
Reviewed-by: Zi Yan <[email protected]>
Cc: Baolin Wang <[email protected]>
Cc: Chengming Zhou <[email protected]>
Cc: Dev Jain <[email protected]>
Cc: Lance Yang <[email protected]>
Cc: Nico Pache <[email protected]>
Cc: Ryan Roberts <[email protected]>
Cc: Wang Yaxin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 mm/mm_slot.h |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/mm/mm_slot.h~mm-mm_sloth-add-comments-for-mm_slot_lookup-insert
+++ a/mm/mm_slot.h
@@ -33,6 +33,12 @@ static inline void mm_slot_free(struct k
 	kmem_cache_free(cache, objp);
 }
 
+/*
+ * Note: mm_slot_lookup and mm_slot_insert cannot be converted to static inline
+ * functions because the hash helpers (hash_for_each_possible and hash_add) rely
+ * on the actual array argument 'hashtable' for sizeof() instead of pointers.
+ */
+
 #define mm_slot_lookup(_hashtable, _mm) 				       \
 ({									       \
 	struct mm_slot *tmp_slot, *mm_slot = NULL;			       \
_

Patches currently in -mm which might be from [email protected] are
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.