Message ID | 20240831095840.4173362-4-lihongbo22@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F17CCA1018 for <linux-mm@archiver.kernel.org>; Sat, 31 Aug 2024 09:50:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CE2A88D001E; Sat, 31 Aug 2024 05:50:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C92768D0008; Sat, 31 Aug 2024 05:50:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B80ED8D001E; Sat, 31 Aug 2024 05:50:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 99C8F8D0008 for <linux-mm@kvack.org>; Sat, 31 Aug 2024 05:50:33 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 4AD1F1A0AF4 for <linux-mm@kvack.org>; Sat, 31 Aug 2024 09:50:33 +0000 (UTC) X-FDA: 82512070746.28.78E3680 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf13.hostedemail.com (Postfix) with ESMTP id E7F0420019 for <linux-mm@kvack.org>; Sat, 31 Aug 2024 09:50:30 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=none; spf=pass (imf13.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=lihongbo22@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725097786; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y9if3zmfeMcziZM6wufVrOqmRX3ZiZJiol82Vgq8GGs=; b=bzDTolxM2I1B4GKN1nuGLwj25g5IQYa4+Q5KkbfC4+dLlg1faKWjtCDrmTlgCtaZ1Rxe2x y39tkzVIjBJaDRKV6ZjRszvBELoIcWSNCQfKLTsi2hNs2TOe5aVkbCwIvdDGP2kwCmNsDn Hq3+7iWyHesqEqYG/oD4Q/NaSrZaVt8= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=none; spf=pass (imf13.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=lihongbo22@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725097786; a=rsa-sha256; cv=none; b=I4hkq02PejpjcI2zgq+Hu9+fg+gOe6QDQeY6bhk/DSsx7IG5DkZOKFB0YduaAm8eokCuoZ XklqpFC/cvGNQghatOTIJ//J1K4IPNrwAu86CQuS222DGuKYNQbvM598lpuPTWYby4lab+ xhJpuD4WiJ+jPxBjFjkcChw3Uqijo24= Received: from mail.maildlp.com (unknown [172.19.163.48]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4WwqxC0Vg7zyQxW; Sat, 31 Aug 2024 17:49:35 +0800 (CST) Received: from dggpeml500022.china.huawei.com (unknown [7.185.36.66]) by mail.maildlp.com (Postfix) with ESMTPS id 6D07D18006C; Sat, 31 Aug 2024 17:50:27 +0800 (CST) Received: from huawei.com (10.90.53.73) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Sat, 31 Aug 2024 17:50:27 +0800 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 Message-ID: <20240831095840.4173362-4-lihongbo22@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240831095840.4173362-1-lihongbo22@huawei.com> References: <20240831095840.4173362-1-lihongbo22@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500022.china.huawei.com (7.185.36.66) X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: E7F0420019 X-Stat-Signature: 4zesx696u9j8xazthmy98imdsj3socbj X-HE-Tag: 1725097830-208056 X-HE-Meta: U2FsdGVkX1/lbgyGhV8kZAcvouqGramn++TKX1/n1gPaFVjJsrwufTPTyMcUEcNwZbKbPu/ThYRQpdh+mLEhSIAsDHWwj/w8l3ORfTBDET5vSHxAp5xKcgVv1fLUwye/aJsGd8iYUyTZAFCYK8V1vMWpqCdwEHyGYyoFcD5bnZWj6vfyRbm1QMiJGcCKBOaZqqSgaT0eNIrVTLnC5Pv/Lj08NqKIBvEC8toW2pPzWh1eseB/8Jw+So3IlpQYzzdcipfqanrYSOj7vs69L+8DDIhiGWsmqItIHOYGWdj4qoWflgFIp8xcu59U3sZGmNCYJEoqB+KvxCJ+2/PbNm/jgUUjOclY+tlT9N0rmqwJGhCV+GJ4jAk/CAFkE0OidWPOA8qq9AnA3h5soFbmaLxqfzW4mPds0wibUgoiDbogUDLukEGHchQCPLRWh3596Lhpu6W8E5uHpbLlxyvv81T1/pc7qBDiUqwjB2goesiXzIootqSV71qRSpM1g3v/8XQaLmikZnGkqfeExi7GO97p/cNiO0R3TBrQCEmSTLzDTxQjSfKeA23l5idVm2qwySy33x3au6QU4JDPpHZrnmg5LCoPFyEG69VWQ/8cJV4zgJKJ694foNj4ct0JwyN71KF2anHMVGs1B61Yh1tjJwuLaYxW9wZPOiG/c9djyEce47SBoAWjt+DfLqMql+3LVzPDEOd7bd7UFh8cckaU4O+AndRf+tL3oO9XoVCsHVfgpod1uSPp4HuJRiyKi0lzzUus/qA9rLZKflUF6/Tpan2e4vklaUod5LE+uj4HKdjx9uHXwKIFcyVNngcm+ne7zR/RsiovqtoytR0mj6dIc+O0l+Hc6reafgJLUbz9+9EmcmgxIe94KS8npzNxfgLlSAyYHEuLacZ/IMBzRF5T2JKFX7HyaqKxlucbnWkDOcEcTIc/9tTN508gavN+8ptP4cJ7Q33v53LxYpoSHOX41ee zNcrIe1A 6IXeym/CBUMApE9ML/EnQZErEljtR1qRLBUIDa6jVIb8M9cfjkzwhA7qiQHTCCBy3E6FdEHg7p/fjm+ttbPZ1jm73mSauJ7er8PX7lqUuMNTj3Uzd3K/LO35Zk+9BT+p558Eo347hr6vgHAZe2jepvIpuH3RCmOFCNnsutepCz+S+mOcW5riyNGN3Mhp8aZ256TqFFxwhXr/i08bOVK4vghIJ39WORXimVrcHP8OFzy4spz5mmN2jEBTvZnFmvhyD3JsTMZrXDm8TZ4k= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Introduce several opposite string choice helpers
|
expand
|
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]);
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(-)