Skip to contentSkip to conversation

mm: Use str_on_off() helper function in report_meminit()

PATCH Applied Thorsten Blum 3 participants 3 messages Oct 18, 2024 – Oct 22, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: Use str_on_off() helper function in report_meminit()

Remove hard-coded strings by using the helper function str_on_off().

---
 mm/mm_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/mm_init.c +2 -2
index 4ba5607aaf19..253972926183 100644
@@ -2573,8 +2573,8 @@ static void __init report_meminit(void)
 		stack = "off";
 
 	pr_info("mem auto-init: stack:%s, heap alloc:%s, heap free:%s\n",
-		stack, want_init_on_alloc(GFP_KERNEL) ? "on" : "off",
-		want_init_on_free() ? "on" : "off");
+		stack, str_on_off(want_init_on_alloc(GFP_KERNEL)),
+		str_on_off(want_init_on_free()));
 	if (want_init_on_free())
 		pr_info("mem auto-init: clearing system memory may take some time...\n");
 }
Signature · 1 line
2.47.0
maintainer Applied
#1 lore raw
Quoted 3 lines · Thorsten Blum

Remove hard-coded strings by using the helper function str_on_off().

Applied to for-next branch of memblock.git tree, thanks!

[1/1] mm: Use str_on_off() helper function in report_meminit()

      commit: 4bb21dbb6728fbe6cb7e2f7dc7e5388962c4125b

tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
branch: for-next

--
Sincerely yours,
Mike.

#2 lore raw
Quoted 5 lines · Mike Rapoport
Quoted 3 lines · Thorsten Blum

Remove hard-coded strings by using the helper function str_on_off().

Quoted 7 lines

Applied to for-next branch of memblock.git tree, thanks!

[1/1] mm: Use str_on_off() helper function in report_meminit()

      commit: 4bb21dbb6728fbe6cb7e2f7dc7e5388962c4125b

tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
branch: for-next

Actually there are multiple such instances which could be converted using these helpers at once in a single patch rather doing in a piecemeal manner.

https://lore.kernel.org/linux-mm/[email protected]/