diff mbox series

[net-next] net: sched: red: remove unused input parameter in red_get_flags()

Message ID 20220827043545.248535-1-shaozhengchao@huawei.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: sched: red: remove unused input parameter in red_get_flags() | expand

Checks

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 Single patches do not need cover letters
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: 0 this patch: 0
netdev/cc_maintainers warning 1 maintainers not CCed: davem@davemloft.net
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: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 17 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

shaozhengchao Aug. 27, 2022, 4:35 a.m. UTC
The input parameter supported_mask is unused in red_get_flags().
Remove it.

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
 include/net/red.h   | 1 -
 net/sched/sch_red.c | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Cong Wang Aug. 27, 2022, 6:46 p.m. UTC | #1
On Sat, Aug 27, 2022 at 12:35:45PM +0800, Zhengchao Shao wrote:
> The input parameter supported_mask is unused in red_get_flags().
> Remove it.
> 

It looks like this is incomplete code unification of the following
commit:

commit 14bc175d9c885c86239de3d730eea85ad67bfe7b
Author: Petr Machata <petrm@mellanox.com>
Date:   Fri Mar 13 01:10:56 2020 +0200

    net: sched: Allow extending set of supported RED flags

How about completing it? ;)

Thanks.
shaozhengchao Aug. 29, 2022, 1:26 a.m. UTC | #2
On 2022/8/28 2:46, Cong Wang wrote:
> On Sat, Aug 27, 2022 at 12:35:45PM +0800, Zhengchao Shao wrote:
>> The input parameter supported_mask is unused in red_get_flags().
>> Remove it.
>>
> 
> It looks like this is incomplete code unification of the following
> commit:
> 
> commit 14bc175d9c885c86239de3d730eea85ad67bfe7b
> Author: Petr Machata <petrm@mellanox.com>
> Date:   Fri Mar 13 01:10:56 2020 +0200
> 
>      net: sched: Allow extending set of supported RED flags
> 
> How about completing it? ;)
> 
> Thanks.

Hi Wang:
	Thank you for your reply. Your suggestion is good. I will try to 
complete it later.

Zhengchao Shao
diff mbox series

Patch

diff --git a/include/net/red.h b/include/net/red.h
index dad41eff8c62..4aed3b2d9725 100644
--- a/include/net/red.h
+++ b/include/net/red.h
@@ -192,7 +192,6 @@  static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog,
 static inline int red_get_flags(unsigned char qopt_flags,
 				unsigned char historic_mask,
 				struct nlattr *flags_attr,
-				unsigned char supported_mask,
 				struct nla_bitfield32 *p_flags,
 				unsigned char *p_userbits,
 				struct netlink_ext_ack *extack)
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index cae3b80e4d9d..346c6c41ce56 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -258,8 +258,8 @@  static int __red_change(struct Qdisc *sch, struct nlattr **tb,
 		return -EINVAL;
 
 	err = red_get_flags(ctl->flags, TC_RED_HISTORIC_FLAGS,
-			    tb[TCA_RED_FLAGS], TC_RED_SUPPORTED_FLAGS,
-			    &flags_bf, &userbits, extack);
+			    tb[TCA_RED_FLAGS], &flags_bf, &userbits,
+			    extack);
 	if (err)
 		return err;