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; }