From patchwork Tue Aug 27 02:45:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Li X-Patchwork-Id: 13778735 Return-Path: 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 D73C7C5472D for ; Tue, 27 Aug 2024 02:37:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4AD3B6B0083; Mon, 26 Aug 2024 22:37:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 45B1F6B0089; Mon, 26 Aug 2024 22:37:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 349BE6B0083; Mon, 26 Aug 2024 22:37:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 10B6F6B0085 for ; Mon, 26 Aug 2024 22:37:30 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id B4A4F12154E for ; Tue, 27 Aug 2024 02:37:29 +0000 (UTC) X-FDA: 82496464218.15.253E3BC Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by imf11.hostedemail.com (Postfix) with ESMTP id 9972540010 for ; Tue, 27 Aug 2024 02:37:26 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=none; spf=pass (imf11.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.191 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=1724726132; 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=vj124tQma8w5gl5tYOwdNBQKHz1Qn8ZfMqp9zmIPX3I=; b=hWxjSEjz4vkZXCsWMW4twVZpCIm725cOI7y2fNCT8/urWA60ny+xpvlK1BEEGffJbb+//O Nw1pIrJHJxiu5CeI8YWPMu60AXxcr+Vha8yYfdWTU65H335561TU7fv1EgK5CFsGLrbi3T KY4V2N27SCCALMlzUzLaGloAA+x4FpM= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=none; spf=pass (imf11.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.191 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=1724726132; a=rsa-sha256; cv=none; b=mHORIuQyW9BfKryUL8LwQFbN5iZ9HL8MTUMFHRg+9zoNxNmZl11/VVeHLsyKFhIdBGtg8V hb+Cjp6EDtb6sPJ83FU+MuBFXarTXStX39ZswBjQmrCmcyTMc+UNKf253hPSkhI+nQTQYr /q0K0NfEZsOte/+Ss7V4ix3n514jKYk= Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4WtBXB04wrz1j7HJ; Tue, 27 Aug 2024 10:37:14 +0800 (CST) Received: from dggpeml500022.china.huawei.com (unknown [7.185.36.66]) by mail.maildlp.com (Postfix) with ESMTPS id 696DC1A0188; Tue, 27 Aug 2024 10:37:23 +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; Tue, 27 Aug 2024 10:37:23 +0800 From: Hongbo Li To: , , , , , CC: , , , Subject: [PATCH -next v3 1/3] lib/string_choices: Add str_true_false()/str_false_true() helper Date: Tue, 27 Aug 2024 10:45:15 +0800 Message-ID: <20240827024517.914100-2-lihongbo22@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240827024517.914100-1-lihongbo22@huawei.com> References: <20240827024517.914100-1-lihongbo22@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500022.china.huawei.com (7.185.36.66) X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 9972540010 X-Stat-Signature: j79cy1fhtt164ob7kz5epn3nzr6ig8ft X-Rspam-User: X-HE-Tag: 1724726246-231020 X-HE-Meta: U2FsdGVkX1/ms5CzxPdCe7sSrGx6ldZgdrxf+H+axGPbtKNd+gua/D9WqZI+nKCDaP2pJzGeNhtCTZG/V8zL9XEt3Y7ZQ1I6kfmvJbkf3W+7st//qfO8KGeads2XijNFzKQBUdeeWwg75v2GugJvSaPlVKtCt/8gOmX4cMRckIoGV8cT9MC9O/AmYBdEQVCkr4YYZRDFU9das4NLxi4x/qIISk2C/qZVYAE0UiG4zTD07zqmCQ0He0ZvXXgwbF4F37mgIuqoWN9VMFyD3gA0Vu69h0i8kEVvOzlhAeNHhDcdMCofN6UPHaFB3cTx+uxiVlPu3Dr55PaGRJuXZFqvHxmgjnkoEtD6woThyThQ57kT4olyWFvQRwcNEOZokmxz2dMPFGostT2qioBKwr9iPFtQAt3Vs45BJbQSXy5UrQVB0SWZKT0bbMIyi0Dse/hElrrD64SmPfJMR4jk/uRDMhmtInueA9MyNgWdedvOXKxAwupeJSPZW/7Nz9LNeiPBXopobF7VKaUd93bUA7TQiE/fDrvx9wVFg1EijwgC/KzRj7TeuzHp+tyBOz92+2HC+ULwJ5Jgib7MImqodv2c63Baw5SHSuk5ELS/O4d9uIBwWd8+78ByGerOkE6v5OZRnl2o9lR08mjyip+996tUyDoCM86vUGtm5CRkZFugcTPitidpn7w/SeQn3j3xGpcatfE/jdzVjPFTPfqsYKKzBq9YdLUUMEbBngjMTdseHWfthvUcrMq2KCBFWre7TU/5tbX91wL1rLnT+XJhH8k7xEpc48uoNOIA1tKtXOAhegI3ZLakKPIa//7l0y0f0newE8A88bHF/DyD/NvQ6HE/9XMmUUwd3k+oZbaDCNhSau0roQeamyxnH55kicO43plaExUYylAOnMyIs2ml9oPt4SKQfcO/Uus0KB5Stk7jPR8ZN/HfaQylF8WrN1cGg+maMN3hzzEOotCwlhzID1t S+ys0Z6k uyxc9cv5bY9//R11exeXCYLHmG2wMvus4mL9hR3hru+EewqQ/mfkXbghRkfagpUgsj9Z3jlvfz0WUARfjNLqVzqGMd84mNydqdLD/fWvl1Fwa94xZo0gEMys3hRd3GDHzGVLBNepkMcM/rsSR2GqDUky7GMxjbAlch2laEbjYkMzrJLf3hWDKWJUSqZhPfcj8aTNv 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: List-Subscribe: List-Unsubscribe: Add str_true_false()/str_false_true() helper to return "true" or "false" string literal. Signed-off-by: Hongbo Li --- include/linux/string_choices.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index 1320bcdcb89c..ebcc56b28ede 100644 --- a/include/linux/string_choices.h +++ b/include/linux/string_choices.h @@ -48,6 +48,12 @@ static inline const char *str_up_down(bool v) } #define str_down_up(v) str_up_down(!(v)) +static inline const char *str_true_false(bool v) +{ + return v ? "true" : "false"; +} +#define str_false_true(v) str_true_false(!(v)) + /** * str_plural - Return the simple pluralization based on English counts * @num: Number used for deciding pluralization From patchwork Tue Aug 27 02:45:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Li X-Patchwork-Id: 13778733 Return-Path: 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 6C3E5C5472D for ; Tue, 27 Aug 2024 02:37:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C25346B007B; Mon, 26 Aug 2024 22:37:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BE0556B0085; Mon, 26 Aug 2024 22:37:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC3E76B0083; Mon, 26 Aug 2024 22:37:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 8EDA76B007B for ; Mon, 26 Aug 2024 22:37:29 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 3A35614152D for ; Tue, 27 Aug 2024 02:37:29 +0000 (UTC) X-FDA: 82496464218.09.9A1DF4D Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf13.hostedemail.com (Postfix) with ESMTP id DFDCE20015 for ; Tue, 27 Aug 2024 02:37:26 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf13.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=lihongbo22@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724726183; a=rsa-sha256; cv=none; b=ybQfdpg53+xbd+6MCbgQmsy1/y0kyUSo1rYmNoFjP1auVjo6G5sbS6tLqF/wC+g4yDweLk GfG0SXTVPwd0sbIcIGxvePF1NphyvufRBta5YCjC0mT7gbXkxO8AyVpv1uaQT50CfaSRg1 PadXVIXhF1p6vALXR5YZLC3qkMj0nbs= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf13.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=lihongbo22@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724726183; 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=obNubUA2MZgKXlZ/nGu2n6WHltKqkX03fnlWZZgfk2Q=; b=4UwBQRhl1ecmlAQPSuADafvoBpZk22UK/0jw52ZLw85U8xfLRruj5Xnn1woAMt9Z0ldF5I XYGt9473wDsGNpPPT8pT25pReohjsN9jWT/8sk0lGa6CocIEuftTDetFJovcbczs9JHFek MgkePG0wDOwKpFBQb+epMtpldHSRB+M= Received: from mail.maildlp.com (unknown [172.19.163.48]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4WtBWS6H3rzyQTf; Tue, 27 Aug 2024 10:36:36 +0800 (CST) Received: from dggpeml500022.china.huawei.com (unknown [7.185.36.66]) by mail.maildlp.com (Postfix) with ESMTPS id 8EF5118007C; Tue, 27 Aug 2024 10:37:23 +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; Tue, 27 Aug 2024 10:37:23 +0800 From: Hongbo Li To: , , , , , CC: , , , Subject: [PATCH -next v3 2/3] mm: make use of str_true_false helper Date: Tue, 27 Aug 2024 10:45:16 +0800 Message-ID: <20240827024517.914100-3-lihongbo22@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240827024517.914100-1-lihongbo22@huawei.com> References: <20240827024517.914100-1-lihongbo22@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500022.china.huawei.com (7.185.36.66) X-Rspamd-Queue-Id: DFDCE20015 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: na41ia6sse94qzg4qx3czqm17k36c1pu X-HE-Tag: 1724726246-620932 X-HE-Meta: U2FsdGVkX18qc4uz4VRV2LALZ4AUSan/YTyt7GXo7nOw6DPUHmED50e7itaAyMNwqxhDSApgRefzjK5c6pWz6ECKV1dgOTz3VKLTkXFS8x7yuR1VBPrU1qJznSHOY4OJ/AMQxsKTY6rGK2yej5AUN8vPAek0GPKNPYNeLdpim0MZsGK0Q9PaOj4m9F6WJPT8jJjHXqjVm+F01Q33jJg/OCYVQmmxsgTjUOqFF7mnlt7TgrJzY1ygvNdwXWj9+kBMS6lK7faqYow4hWMJFB/mcN8vYZzIlMlmtmFipVvHYzEc8fSJoz236To0lcgGov3CsT75RXRHXORE+aQjtYzMcG8uepUkzAaGNTnksLgRdRnkHVatAIapH0vd2gViWnCGt6R+w4bg5PhvcEqWSGx789H1n53asOiI3mmTz8Xox1tsWqNqwvI6IBotMwnUsbthyP4z1pgu+2T7h/28Bwe6jLMjEQZ+49kChUhv6Faz2mTq2ZE4wLczxMbrk8wb5SsPoD1DbeVfavwR6Ro5L+h9ociOiZj9yjwcWwsnr5/BB2C/gJqQJVMiJdHgWDZe0BnOI7MrHdODUNvF0jhKr4pzJ1RR3pbOK2Q9a/Y0bF5CK33CNNlnm7AfqIHlAnrvLzQrnNtlmGVVdVBBHry9DG/y2kS1oUpiWXcl3osLcXXqxg1/AeLN08QKKCTXI6FxdVlRCSrgW+eLLAeu3YuicZBYsqzhYuiLg1k/NktSt9HtE9cPaZ+Qz7Y1HxCLtMrfDVfAI7tS0s+BHaV9l3fGCzzgnSePDbp5tAyhDcfY/Tri2QTyFkWZTzqhKw1POyVHXojERBW2/WVLMHnhwafKqMXyELYdoTbMnB2JlltweeZii2qsj7oGQTZCp6465apT1+cuNcwT3hJH+n7cKyDEfmTTbjKiPb9tYeg4PyjtzEwapAZ1oVIZTPy2MdGmk3Ohieo628cNPt22AGNbOGfUGtw kmSsN37U HQKhnxmC2BjXRIx1WfXWfdaLrp8E124/kjMBs0HyekRN6rY2o+w0rmpd59OBxJNQrKmFVdidlQRglu5nxDx4A/KoWawOxuZsEpBnvfhjsuUEcnco325sN5vPVTDr8AEFqQ9WjdVnALMb8mTMb61fe0EgEbSNyQ6DHU8NB+SkShV0zs9puXSRD05rYJfwFOI/+jOIL 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: List-Subscribe: List-Unsubscribe: The helper str_true_false is introduced to reback "true/false" string literal. We can simplify this format by str_true_false. Signed-off-by: Hongbo Li --- mm/memory-tiers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c index 2a642ea86cb2..66ea9099dd63 100644 --- a/mm/memory-tiers.c +++ b/mm/memory-tiers.c @@ -940,8 +940,7 @@ bool numa_demotion_enabled = false; static ssize_t demotion_enabled_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { - return sysfs_emit(buf, "%s\n", - numa_demotion_enabled ? "true" : "false"); + return sysfs_emit(buf, "%s\n", str_true_false(numa_demotion_enabled)); } static ssize_t demotion_enabled_store(struct kobject *kobj, From patchwork Tue Aug 27 02:45:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Li X-Patchwork-Id: 13778736 Return-Path: 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 B69A5C5472E for ; Tue, 27 Aug 2024 02:37:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 74EE66B0085; Mon, 26 Aug 2024 22:37:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6FA6D6B0088; Mon, 26 Aug 2024 22:37:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 51EB66B008A; Mon, 26 Aug 2024 22:37:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 2921B6B0088 for ; Mon, 26 Aug 2024 22:37:30 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D3A03C1404 for ; Tue, 27 Aug 2024 02:37:29 +0000 (UTC) X-FDA: 82496464218.11.0EFEBCC Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf01.hostedemail.com (Postfix) with ESMTP id 9D94140015 for ; Tue, 27 Aug 2024 02:37:27 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.189 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=1724726161; 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=c5i9eKYZg2fqn3/WwjNJqZUVr8tXASqbUq2SsSnDXnM=; b=FTuumVAv38QIAK6i52IFPtlJq9IzjJHmUV2ojjtRopd5PiLB2hRnXHyNZCQ9C4uFDzGNJO 5ivNIfyP5w5721XagDLinMAz596Yh/yHj/xDUY2Xi9uDZx1HAumDwV5sexfmDjUsZy7Iol OkWGZiW8dkYHw2wyGbJpOcZnpyTsAuY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724726161; a=rsa-sha256; cv=none; b=5oIoeMOb/Y+SsWXsBrFqH632Qhr2Qk+ScEzgyokq7EetzaZeIRimeXb6ucr04N40LG7It3 Ovpg3xOwaE8ktaNEbmXbFb34HE8pgX9BLVYyw0eh9cv1uNLkVaEqj6cfMGetfWnq58whrx D1MejS0c99ug0nsf7DzJkqT54S1HBQA= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=lihongbo22@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4WtBQq36KNzQqp3; Tue, 27 Aug 2024 10:32:35 +0800 (CST) Received: from dggpeml500022.china.huawei.com (unknown [7.185.36.66]) by mail.maildlp.com (Postfix) with ESMTPS id BA79A140137; Tue, 27 Aug 2024 10:37:23 +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; Tue, 27 Aug 2024 10:37:23 +0800 From: Hongbo Li To: , , , , , CC: , , , Subject: [PATCH -next v3 3/3] nfs make use of str_false_true helper Date: Tue, 27 Aug 2024 10:45:17 +0800 Message-ID: <20240827024517.914100-4-lihongbo22@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240827024517.914100-1-lihongbo22@huawei.com> References: <20240827024517.914100-1-lihongbo22@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500022.china.huawei.com (7.185.36.66) X-Stat-Signature: rpmiwnh5dbitho3ez8iwk9o358hxdmmo X-Rspamd-Queue-Id: 9D94140015 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1724726247-317230 X-HE-Meta: U2FsdGVkX1+GLgKjZer3wQ7WBfATdYpuZn9gFMBW2tdrfDp7Gg1gdtqcPgyG1DUw9cNuYQh9MAkfQlNrPm3YxcOiZENY45l+Pxbtr0B0lbA7UQOUZqgdREYdkKBIPyjSFUYRnwISut5JP9pfa3CRJNMRy57+YG/JPfnpkwTwPwt57HDhWZMWAMOAuf8+9EY69L27LYLIbsDsB3ooe8QeZRwyWwA7Mi4OjSeCKeRJ+driNlm14eWjtt06a/B78vCNTLZTmRT+0LNQVNOx6V1r2ZfqPbXx+nLlSt3qDjzr1QdEGm5h4fVNJhmYLaznOHc7S4cS34RXIYhwJPG2TqD20/tFrcqoFIEqXkn+3/7y3l0YPi8ba1VRyMPtPP7sSbS13hAr/Kfu0IP//7eIz5xT7N0HygKTsuwZHys948y0yeIN1PyW+U9GN4mNMLBL/XT6hAFooQbFCZi17IZgTWNHVfK6X/mfzUCqBpCVfebx+a9u4U1Konj8C7fkH3/ag2u46+5wYqA5yXUXkgVQB/gb0u6S3H7hdz1uuGnZlfXNywNjqH+WaN4RNCU/+mfH5PLhAis8AKR6m3Gs+ems7BeM5Ytl52mPRH6s4OeHMdWjhTU4lsE9INL+RPYPEvNCjmVJsLQ3ZUIjgGzOZHWRl6JdUsD4Z0naRUFEdSgB1exLtDjQkkIk+UY9yo31CEKDz0iP4gtpqDxbgUiaoa/Mh5tpmo43JlyvUS27Q2KlJ/hlewPSgWpDIKD5ODvLGCChtJ6H5RJz3CtlF/Els7cA9tQeZZ17Fwl7PYZqaBNE4eLQSaUA0Hw5BWuOXPsPbolExnKlwbdZ8kBRGySCQ69YmNH7HTD4Ph/pVgPSKCnwsFzGAR9qd6lr9dweCqOAcYakeD0SM04ZHfKSVBPkmSB/Zp/eqKL91M7ixgZW+kpLRBicpqA2OeYCdquAj51OGSmAoLweyeY7OI3s1PTR6oReQ4R GkHGkMyK bVCGTI6P0Qpdy6y9ANUTMU890hhHwZibB70wSz54z28ChImQHdq6VrV/beCp0NRnePOw4kPbESHXEFyZiISAXBd/6NO8al1Na0VOxe6IA4Btif99E1GV5nhLlyrKpoSRqvTcDRORSUqKElEly5xSMZ0PPekm26yhHthNE/6535aoRCFFaIUjEDnHQG3zXwQPHFgZO 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: List-Subscribe: List-Unsubscribe: The helper str_false_true is introduced to reback "false/true" string literal. We can simplify this format by str_false_true. Signed-off-by: Hongbo Li --- fs/nfs/nfs4xdr.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 7704a4509676..61190d6a5a77 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -3447,7 +3447,7 @@ static int decode_attr_link_support(struct xdr_stream *xdr, uint32_t *bitmap, ui *res = be32_to_cpup(p); bitmap[0] &= ~FATTR4_WORD0_LINK_SUPPORT; } - dprintk("%s: link support=%s\n", __func__, *res == 0 ? "false" : "true"); + dprintk("%s: link support=%s\n", __func__, str_false_true(*res == 0)); return 0; } @@ -3465,7 +3465,7 @@ static int decode_attr_symlink_support(struct xdr_stream *xdr, uint32_t *bitmap, *res = be32_to_cpup(p); bitmap[0] &= ~FATTR4_WORD0_SYMLINK_SUPPORT; } - dprintk("%s: symlink support=%s\n", __func__, *res == 0 ? "false" : "true"); + dprintk("%s: symlink support=%s\n", __func__, str_false_true(*res == 0)); return 0; } @@ -3607,7 +3607,7 @@ static int decode_attr_case_insensitive(struct xdr_stream *xdr, uint32_t *bitmap *res = be32_to_cpup(p); bitmap[0] &= ~FATTR4_WORD0_CASE_INSENSITIVE; } - dprintk("%s: case_insensitive=%s\n", __func__, *res == 0 ? "false" : "true"); + dprintk("%s: case_insensitive=%s\n", __func__, str_false_true(*res == 0)); return 0; } @@ -3625,7 +3625,7 @@ static int decode_attr_case_preserving(struct xdr_stream *xdr, uint32_t *bitmap, *res = be32_to_cpup(p); bitmap[0] &= ~FATTR4_WORD0_CASE_PRESERVING; } - dprintk("%s: case_preserving=%s\n", __func__, *res == 0 ? "false" : "true"); + dprintk("%s: case_preserving=%s\n", __func__, str_false_true(*res == 0)); return 0; } @@ -4333,8 +4333,7 @@ static int decode_attr_xattrsupport(struct xdr_stream *xdr, uint32_t *bitmap, *res = be32_to_cpup(p); bitmap[2] &= ~FATTR4_WORD2_XATTR_SUPPORT; } - dprintk("%s: XATTR support=%s\n", __func__, - *res == 0 ? "false" : "true"); + dprintk("%s: XATTR support=%s\n", __func__, str_false_true(*res == 0)); return 0; }