From: Hongbo Li <lihongbo22@huawei.com>
To: <kees@kernel.org>, <andy@kernel.org>,
<willemdebruijn.kernel@gmail.com>, <jasowang@redhat.com>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <akpm@linux-foundation.org>
Cc: <linux-hardening@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-mm@kvack.org>, <lihongbo22@huawei.com>
Subject: [PATCH -next 3/4] mm: page_alloc: Make use of str_off_on helper
Date: Sat, 31 Aug 2024 17:58:39 +0800 [thread overview]
Message-ID: <20240831095840.4173362-4-lihongbo22@huawei.com> (raw)
In-Reply-To: <20240831095840.4173362-1-lihongbo22@huawei.com>
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 --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]);
--
2.34.1
next prev parent reply other threads:[~2024-08-31 9:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-31 9:58 [PATCH -next 0/4] Introduce several opposite string choice helpers Hongbo Li
2024-08-31 9:58 ` [PATCH -next 1/4] lib/string_choices: " Hongbo Li
2024-08-31 9:58 ` [PATCH -next 2/4] tun: Make use of str_disabled_enabled helper Hongbo Li
2024-08-31 20:07 ` Jakub Kicinski
2024-09-02 1:27 ` Hongbo Li
2024-09-02 6:10 ` Gal Pressman
2024-09-02 16:11 ` Jakub Kicinski
2024-09-02 10:49 ` Andy Shevchenko
2024-09-02 14:30 ` Willem de Bruijn
2024-09-03 6:25 ` Hongbo Li
2024-09-03 15:09 ` Andy Shevchenko
2024-09-04 2:27 ` Hongbo Li
2024-09-04 14:33 ` Jakub Kicinski
2024-08-31 9:58 ` Hongbo Li [this message]
2024-08-31 9:58 ` [PATCH net-next 4/4] net: sock: Make use of str_no_yes() helper Hongbo Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240831095840.4173362-4-lihongbo22@huawei.com \
--to=lihongbo22@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=andy@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jasowang@redhat.com \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox