From: Zhengchao Shao <shaozhengchao@huawei.com>
To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<jhs@mojatatu.com>, <xiyou.wangcong@gmail.com>,
<jiri@resnulli.us>, <davem@davemloft.net>, <edumazet@google.com>,
<kuba@kernel.org>, <pabeni@redhat.com>
Cc: <weiyongjun1@huawei.com>, <yuehaibing@huawei.com>,
<shaozhengchao@huawei.com>
Subject: [PATCH net-next,3/3] net: sched: make red_offload() void
Date: Tue, 16 Aug 2022 10:04:23 +0800 [thread overview]
Message-ID: <20220816020423.323820-4-shaozhengchao@huawei.com> (raw)
In-Reply-To: <20220816020423.323820-1-shaozhengchao@huawei.com>
The return value of function red_offload is unused, make red_offload()
void.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
net/sched/sch_red.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index 40adf1f07a82..8425f4169eed 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -181,7 +181,7 @@ static void red_reset(struct Qdisc *sch)
red_restart(&q->vars);
}
-static int red_offload(struct Qdisc *sch, bool enable)
+static void red_offload(struct Qdisc *sch, bool enable)
{
struct red_sched_data *q = qdisc_priv(sch);
struct net_device *dev = qdisc_dev(sch);
@@ -191,7 +191,7 @@ static int red_offload(struct Qdisc *sch, bool enable)
};
if (!tc_can_offload(dev) || !dev->netdev_ops->ndo_setup_tc)
- return -EOPNOTSUPP;
+ return;
if (enable) {
opt.command = TC_RED_REPLACE;
@@ -207,7 +207,7 @@ static int red_offload(struct Qdisc *sch, bool enable)
opt.command = TC_RED_DESTROY;
}
- return dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_QDISC_RED, &opt);
+ dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_QDISC_RED, &opt);
}
static void red_destroy(struct Qdisc *sch)
--
2.17.1
next prev parent reply other threads:[~2022-08-16 6:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 2:04 [PATCH net-next,0/3] cleanup of qdisc offload function Zhengchao Shao
2022-08-16 2:04 ` [PATCH net-next,1/3] net: sched: make mq_offload() void Zhengchao Shao
2022-08-16 2:04 ` [PATCH net-next,2/3] net: sched: make prio_offload() void Zhengchao Shao
2022-08-16 2:04 ` Zhengchao Shao [this message]
2022-08-16 3:10 ` [PATCH net-next,0/3] cleanup of qdisc offload function Jakub Kicinski
2022-08-16 3:32 ` shaozhengchao
2022-08-16 18:13 ` Jakub Kicinski
2022-08-17 13:19 ` Jamal Hadi Salim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220816020423.323820-4-shaozhengchao@huawei.com \
--to=shaozhengchao@huawei.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=weiyongjun1@huawei.com \
--cc=xiyou.wangcong@gmail.com \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).