linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Use str_on_off() helper function in report_meminit()
@ 2024-10-18 10:31 Thorsten Blum
  2024-10-18 16:08 ` Mike Rapoport
  0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Blum @ 2024-10-18 10:31 UTC (permalink / raw)
  To: Mike Rapoport, Andrew Morton; +Cc: Thorsten Blum, linux-mm, linux-kernel

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

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 mm/mm_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/mm_init.c b/mm/mm_init.c
index 4ba5607aaf19..253972926183 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -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");
 }
-- 
2.47.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm: Use str_on_off() helper function in report_meminit()
  2024-10-18 10:31 [PATCH] mm: Use str_on_off() helper function in report_meminit() Thorsten Blum
@ 2024-10-18 16:08 ` Mike Rapoport
  2024-10-22  5:15   ` Anshuman Khandual
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Rapoport @ 2024-10-18 16:08 UTC (permalink / raw)
  To: Andrew Morton, Thorsten Blum; +Cc: Mike Rapoport, linux-mm, linux-kernel

On Fri, 18 Oct 2024 12:31:51 +0200, Thorsten Blum wrote:
> 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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm: Use str_on_off() helper function in report_meminit()
  2024-10-18 16:08 ` Mike Rapoport
@ 2024-10-22  5:15   ` Anshuman Khandual
  0 siblings, 0 replies; 3+ messages in thread
From: Anshuman Khandual @ 2024-10-22  5:15 UTC (permalink / raw)
  To: Mike Rapoport, Andrew Morton, Thorsten Blum; +Cc: linux-mm, linux-kernel



On 10/18/24 21:38, Mike Rapoport wrote:
> On Fri, 18 Oct 2024 12:31:51 +0200, Thorsten Blum wrote:
>> 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

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/a11f46f7-29bc-4242-bd8b-d316065607e2@arm.com/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-22  5:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-18 10:31 [PATCH] mm: Use str_on_off() helper function in report_meminit() Thorsten Blum
2024-10-18 16:08 ` Mike Rapoport
2024-10-22  5:15   ` Anshuman Khandual

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox