From patchwork Mon Jul 4 12:43:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shaozhengchao X-Patchwork-Id: 12905274 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A116EC43334 for ; Mon, 4 Jul 2022 12:38:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234175AbiGDMig (ORCPT ); Mon, 4 Jul 2022 08:38:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234081AbiGDMic (ORCPT ); Mon, 4 Jul 2022 08:38:32 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A84991115B; Mon, 4 Jul 2022 05:38:31 -0700 (PDT) Received: from dggpeml500026.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Lc4zz10SJzkWpq; Mon, 4 Jul 2022 20:36:31 +0800 (CST) Received: from huawei.com (10.175.101.6) by dggpeml500026.china.huawei.com (7.185.36.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 4 Jul 2022 20:38:29 +0800 From: Zhengchao Shao To: , , , , , , , , CC: , , Subject: [PATCH net-next] net/sched: remove return value of unregister_tcf_proto_ops Date: Mon, 4 Jul 2022 20:43:22 +0800 Message-ID: <20220704124322.355211-1-shaozhengchao@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500026.china.huawei.com (7.185.36.106) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Return value of unregister_tcf_proto_ops is useless, remove it. Signed-off-by: Zhengchao Shao --- include/net/pkt_cls.h | 2 +- net/sched/cls_api.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 8cf001aed858..d9d90e6925e1 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -23,7 +23,7 @@ struct tcf_walker { }; int register_tcf_proto_ops(struct tcf_proto_ops *ops); -int unregister_tcf_proto_ops(struct tcf_proto_ops *ops); +void unregister_tcf_proto_ops(struct tcf_proto_ops *ops); struct tcf_block_ext_info { enum flow_block_binder_type binder_type; diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 9bb4d3dcc994..fdc9acbd56df 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -194,10 +194,9 @@ EXPORT_SYMBOL(register_tcf_proto_ops); static struct workqueue_struct *tc_filter_wq; -int unregister_tcf_proto_ops(struct tcf_proto_ops *ops) +void unregister_tcf_proto_ops(struct tcf_proto_ops *ops) { struct tcf_proto_ops *t; - int rc = -ENOENT; /* Wait for outstanding call_rcu()s, if any, from a * tcf_proto_ops's destroy() handler. @@ -209,12 +208,11 @@ int unregister_tcf_proto_ops(struct tcf_proto_ops *ops) list_for_each_entry(t, &tcf_proto_base, head) { if (t == ops) { list_del(&t->head); - rc = 0; break; } } write_unlock(&cls_mod_lock); - return rc; + return; } EXPORT_SYMBOL(unregister_tcf_proto_ops);