Message ID | 20240831095840.4173362-5-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 D56FFCA1018 for <linux-mm@archiver.kernel.org>; Sat, 31 Aug 2024 09:50:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B86808D0008; Sat, 31 Aug 2024 05:50:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 987598D0024; Sat, 31 Aug 2024 05:50:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5EB1A8D0023; Sat, 31 Aug 2024 05:50:34 -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 1647A8D0020 for <linux-mm@kvack.org>; Sat, 31 Aug 2024 05:50:34 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id A2C45C0AB4 for <linux-mm@kvack.org>; Sat, 31 Aug 2024 09:50:33 +0000 (UTC) X-FDA: 82512070746.23.B006D00 Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by imf26.hostedemail.com (Postfix) with ESMTP id 366CF140004 for <linux-mm@kvack.org>; Sat, 31 Aug 2024 09:50:30 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.35 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=1725097740; 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=m9NPSHcWaQsc5IMGueNrHTfHwUDvg5vR8DXdOHsWQG4=; b=LI/TFpyJPD8bVYEy+BMsLuxpMYpnBkCfLdBimEtTY0GzwXA5S67bTCHl0gl3gYTyVZWJX/ 2YahCDZxspM7ZvOyG1K8goquv1Wmdds8CX5LCT2NKA7sA1NkYMNxy/gOmLppcgcpccmLiH RAVSjVKmv9XmWbVQof825QNcN4BahhQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725097740; a=rsa-sha256; cv=none; b=fqLaXpDjSH8UIFMjKxEMLujMdNlNDKiTg2Ne+qE1ko7jeKdRyKewi7o8H1uE17fsNO4Fl5 P4LvCqJl1pEhknRybcpgciS7NilZKi3V7Sv+BkuO84z+F8QoAW832nsy6bEC/chUr6naK7 1tOGG8aep3c5YUIRNAt6PnjGBH4R2GQ= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.35 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.214]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Wwqxv6JD6z1S8Kb; Sat, 31 Aug 2024 17:50:11 +0800 (CST) Received: from dggpeml500022.china.huawei.com (unknown [7.185.36.66]) by mail.maildlp.com (Postfix) with ESMTPS id 98D901A016C; 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 net-next 4/4] net: sock: Make use of str_no_yes() helper Date: Sat, 31 Aug 2024 17:58:40 +0800 Message-ID: <20240831095840.4173362-5-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-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 366CF140004 X-Stat-Signature: spuuiit1dmiuo749gt1cwajtj7ubqyj5 X-HE-Tag: 1725097830-808757 X-HE-Meta: U2FsdGVkX1/MhIXcvnh/H5jbsGuDCNc1U5EEB/c9CH6duO7z3NxfeHZWHLbV+KwRYr66rlnkJSO0s5uwfUd0ljV1uqzgudYU+DoLPKp6R30yi3kKPkyl8MkxCBDThH7stGpsuPwoeJaAh/Dislzh81Q0Qd9q95VVO520e/MHrAJfWniRmlw/fs9qRSGuOpWDP5S6O3zDXyz46BX/sw1OoKbTNNbTL7yoj7r5E040ctU1nhRtM/aqn1loYgnzhzBGHvW9vvLd8rbQnMpyRgdalYBjD66nJpdcgQt7oS+1kmunAMmpnnZYEG7thaZzvNmk5Gw7pRGd347OlRWHtDQLf5liwG5MM05Hqenfa2yDoIsq8Vsmp6KVVhZqyDJ0iX5GCPQLsH+v6tYUPH3bdEOsvbFTpYvjGk5RsJhNSJ00GQr27eu5cxTcMEM1s14+UPrPEtaz8hUncbd4iGkaIH5ISW8MwZSI0cbVrCv9kBwzWdSOUm9PzTn57by0235F/BGmQqzr7WGCAS29Zkd/QT764TLNgPXT8F4XXebHou808FUiTo6JaStxCE+UAEaP8MV7n/Vk0OzYVDOD71flI88p6OXVFe/Lsjv7hldjZ2iemxvm0WUKrq8geF2cjUiI9AWXj4+mo+TxVOgwEqbxjPGGp7c6naq0QJzYvrpWlWEHTey2IT5+KSmTbFwD7sxE1HGkbodKapcNq+N81Rn6a7IfnfY6twYsopkhf1CIL+zR9pwq6RKzhw9Qgf0HMUzIABOAKO99qWAA2iFjvAI+0cC0nZKbvfCA08JDeUt7IykaG9S0dNPqoBq9a+HzSAUxuk7jd4kLDWjTiaesI+QGiKjx3sGFYZ09NGL2UKvGmSkcIPgcVtjJ6W4Sip/Htu94LrkGE9rvNIso2JTJltLcaF0/Idwow6XF8n9phjW6eVAdOINdDWQ31ZPleDLZGbItGxu4EB0FlOZCjmJep3x4O3O UbdmsVbT kU+a7RtpEG0JHYRs7q4FhJMPMYJxgPKsBSGZXnAWjLbnaj1JGJhx87p2mLxnQoAE/VPzP8MJD9bVUE/3HhUIy+cGuYlzviaGrN2HoIywZvq6xk32skhaEK7vPIsUuCwHQLmqo9TeT2wAV4CtnFEJ4lbg5db7basX3izff3nOHq3ahEbQsKtxohEDFM6XSw1bGV7d2MGj+8WdLYttj+Z/B5bB4QF9QYFKB1QMPS2kGGmZUs9XAkQvANaICoC4gX65pi8/OIlcjVudTYOk= 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/net/core/sock.c b/net/core/sock.c index 542bc5462cb5..f976bb4a402f 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -4086,7 +4086,7 @@ static void proto_seq_printf(struct seq_file *seq, struct proto *proto) sock_prot_memory_allocated(proto), sock_prot_memory_pressure(proto), proto->max_header, - proto->slab == NULL ? "no" : "yes", + str_no_yes(proto->slab == NULL), module_name(proto->owner), proto_method_implemented(proto->close), proto_method_implemented(proto->connect),
The helper str_no_yes is introduced to reback "no/yes" string literal. We can use str_no_yes() helper instead of open coding the same. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> --- net/core/sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)