Message ID | 20220815030417.271894-1-shaozhengchao@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 52327d2e3996f2cac7df6de02623fd8d80fb4c85 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] net: sched: remove the unused return value of unregister_qdisc | expand |
Hello: This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <kuba@kernel.org>: On Mon, 15 Aug 2022 11:04:17 +0800 you wrote: > Return value of unregister_qdisc is unused, remove it. > > Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> > --- > include/net/pkt_sched.h | 2 +- > net/sched/sch_api.c | 5 +++-- > 2 files changed, 4 insertions(+), 3 deletions(-) Here is the summary with links: - [net-next] net: sched: remove the unused return value of unregister_qdisc https://git.kernel.org/netdev/net-next/c/52327d2e3996 You are awesome, thank you!
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 3372a1f67cf4..29f65632ebc5 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -100,7 +100,7 @@ struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops, struct netlink_ext_ack *extack); int register_qdisc(struct Qdisc_ops *qops); -int unregister_qdisc(struct Qdisc_ops *qops); +void unregister_qdisc(struct Qdisc_ops *qops); void qdisc_get_default(char *id, size_t len); int qdisc_set_default(const char *id); diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index bf87b50837a8..8b4d575a3bbd 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -171,7 +171,7 @@ int register_qdisc(struct Qdisc_ops *qops) } EXPORT_SYMBOL(register_qdisc); -int unregister_qdisc(struct Qdisc_ops *qops) +void unregister_qdisc(struct Qdisc_ops *qops) { struct Qdisc_ops *q, **qp; int err = -ENOENT; @@ -186,7 +186,8 @@ int unregister_qdisc(struct Qdisc_ops *qops) err = 0; } write_unlock(&qdisc_mod_lock); - return err; + + WARN(err, "unregister qdisc(%s) failed\n", qops->id); } EXPORT_SYMBOL(unregister_qdisc);
Return value of unregister_qdisc is unused, remove it. Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> --- include/net/pkt_sched.h | 2 +- net/sched/sch_api.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)