From patchwork Tue Aug 16 02:04:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shaozhengchao X-Patchwork-Id: 12944367 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 13B92C32772 for ; Tue, 16 Aug 2022 06:51:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230327AbiHPGu7 (ORCPT ); Tue, 16 Aug 2022 02:50:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231298AbiHPGum (ORCPT ); Tue, 16 Aug 2022 02:50:42 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79908107AE0; Mon, 15 Aug 2022 19:01:25 -0700 (PDT) Received: from dggpeml500026.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4M6DnS2L6vzkWPw; Tue, 16 Aug 2022 09:58:04 +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; Tue, 16 Aug 2022 10:01:23 +0800 From: Zhengchao Shao To: , , , , , , , , CC: , , Subject: [PATCH net-next,1/3] net: sched: make mq_offload() void Date: Tue, 16 Aug 2022 10:04:21 +0800 Message-ID: <20220816020423.323820-2-shaozhengchao@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220816020423.323820-1-shaozhengchao@huawei.com> References: <20220816020423.323820-1-shaozhengchao@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) 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 The return value of function mq_offload is unused, make mq_offload() void. Signed-off-by: Zhengchao Shao --- net/sched/sch_mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/sched/sch_mq.c b/net/sched/sch_mq.c index 83d2e54bf303..9bfa9c8d4872 100644 --- a/net/sched/sch_mq.c +++ b/net/sched/sch_mq.c @@ -21,7 +21,7 @@ struct mq_sched { struct Qdisc **qdiscs; }; -static int mq_offload(struct Qdisc *sch, enum tc_mq_command cmd) +static void mq_offload(struct Qdisc *sch, enum tc_mq_command cmd) { struct net_device *dev = qdisc_dev(sch); struct tc_mq_qopt_offload opt = { @@ -30,9 +30,9 @@ static int mq_offload(struct Qdisc *sch, enum tc_mq_command cmd) }; if (!tc_can_offload(dev) || !dev->netdev_ops->ndo_setup_tc) - return -EOPNOTSUPP; + return; - return dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_QDISC_MQ, &opt); + dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_QDISC_MQ, &opt); } static int mq_offload_stats(struct Qdisc *sch)