Message ID | 20220816020423.323820-4-shaozhengchao@huawei.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | cleanup of qdisc offload function | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Series has a cover letter |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 85 this patch: 85 |
netdev/cc_maintainers | success | CCed 8 of 8 maintainers |
netdev/build_clang | success | Errors and warnings before: 0 this patch: 0 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 85 this patch: 85 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 24 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
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)
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(-)