[PATCH net-next,1/3] net: sched: make mq_offload() void

From: Zhengchao Shao
Date: Tue Aug 16 2022 - 02:51:07 EST


The return value of function mq_offload is unused, make mq_offload() void.

Signed-off-by: Zhengchao Shao <shaozhengchao@xxxxxxxxxx>
---
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