lkml.org 
[lkml]   [2022]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next,1/3] net: sched: make mq_offload() void
Date
The return value of function mq_offload is unused, make mq_offload() void.

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
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)
--
2.17.1
\
 
 \ /
  Last update: 2022-08-16 08:52    [W:0.076 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site