diff mbox series

[-next,3/4] mm: page_alloc: Make use of str_off_on helper

Message ID 20240831095840.4173362-4-lihongbo22@huawei.com (mailing list archive)
State Rejected
Headers show
Series Introduce several opposite string choice helpers | expand

Checks

Context Check Description
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Hongbo Li Aug. 31, 2024, 9:58 a.m. UTC
The helper str_off_on is introduced to reback "off/on"
string literal. We can use str_off_on() helper instead
of open coding the same.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
---
 mm/page_alloc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 04a90dfbce09..8adda0b67253 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5517,10 +5517,9 @@  void __ref build_all_zonelists(pg_data_t *pgdat)
 		page_group_by_mobility_disabled = 1;
 	else
 		page_group_by_mobility_disabled = 0;
-
 	pr_info("Built %u zonelists, mobility grouping %s.  Total pages: %ld\n",
 		nr_online_nodes,
-		page_group_by_mobility_disabled ? "off" : "on",
+		str_off_on(page_group_by_mobility_disabled),
 		vm_total_pages);
 #ifdef CONFIG_NUMA
 	pr_info("Policy zone: %s\n", zone_names[policy_zone]);