[merged mm-stable] mm-memory_hotplug-add-mhp_online_type_to_str-and-export-string-helpers.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/memory_hotplug: add mhp_online_type_to_str() and export string helpers
has been removed from the -mm tree. Its filename was
mm-memory_hotplug-add-mhp_online_type_to_str-and-export-string-helpers.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: Gregory Price <[email protected]>
Subject: mm/memory_hotplug: add mhp_online_type_to_str() and export string helpers
Date: Sun, 12 Jul 2026 11:44:56 -0400
Add mhp_online_type_to_str() as the inverse of mhp_online_type_from_str(),
and export both so a driver can render and parse the memory online type
through its own sysfs interface.
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Gregory Price <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Acked-by: David Hildenbrand (Arm) <[email protected]>
Reviewed-by: Dan Williams <[email protected]>
Cc: Alison Schofield <[email protected]>
Cc: Danilo Krummrich <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Liam R. Howlett <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Pankaj Gupta <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Vishal Verma <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
drivers/base/memory.c | 9 +++++++++
include/linux/memory_hotplug.h | 1 +
2 files changed, 10 insertions(+)
--- a/drivers/base/memory.c~mm-memory_hotplug-add-mhp_online_type_to_str-and-export-string-helpers
+++ a/drivers/base/memory.c
@@ -46,6 +46,15 @@ int mhp_online_type_from_str(const char
}
return -EINVAL;
}
+EXPORT_SYMBOL_GPL(mhp_online_type_from_str);
+
+const char *mhp_online_type_to_str(int online_type)
+{
+ if (online_type < 0 || online_type >= (int)ARRAY_SIZE(online_type_to_str))
+ return NULL;
+ return online_type_to_str[online_type];
+}
+EXPORT_SYMBOL_GPL(mhp_online_type_to_str);
#define to_memory_block(dev) container_of(dev, struct memory_block, dev)
--- a/include/linux/memory_hotplug.h~mm-memory_hotplug-add-mhp_online_type_to_str-and-export-string-helpers
+++ a/include/linux/memory_hotplug.h
@@ -127,6 +127,7 @@ extern int arch_add_memory(int nid, u64
extern u64 max_mem_size;
extern int mhp_online_type_from_str(const char *str);
+const char *mhp_online_type_to_str(int online_type);
/* If movable_node boot option specified */
extern bool movable_node_enabled;
_
Patches currently in -mm which might be from [email protected] are