linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: sched: red: remove unused input parameter in red_get_flags()
@ 2022-08-27  4:35 Zhengchao Shao
  2022-08-27 18:46 ` Cong Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Zhengchao Shao @ 2022-08-27  4:35 UTC (permalink / raw)
  To: netdev, linux-kernel, edumazet, kuba, pabeni, jhs, xiyou.wangcong, jiri
  Cc: weiyongjun1, yuehaibing, shaozhengchao

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(-)

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;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: sched: red: remove unused input parameter in red_get_flags()
  2022-08-27  4:35 [PATCH net-next] net: sched: red: remove unused input parameter in red_get_flags() Zhengchao Shao
@ 2022-08-27 18:46 ` Cong Wang
  2022-08-29  1:26   ` shaozhengchao
  0 siblings, 1 reply; 3+ messages in thread
From: Cong Wang @ 2022-08-27 18:46 UTC (permalink / raw)
  To: Zhengchao Shao
  Cc: netdev, linux-kernel, edumazet, kuba, pabeni, jhs, jiri,
	weiyongjun1, yuehaibing

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: sched: red: remove unused input parameter in red_get_flags()
  2022-08-27 18:46 ` Cong Wang
@ 2022-08-29  1:26   ` shaozhengchao
  0 siblings, 0 replies; 3+ messages in thread
From: shaozhengchao @ 2022-08-29  1:26 UTC (permalink / raw)
  To: Cong Wang
  Cc: netdev, linux-kernel, edumazet, kuba, pabeni, jhs, jiri,
	weiyongjun1, yuehaibing



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-29  1:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-27  4:35 [PATCH net-next] net: sched: red: remove unused input parameter in red_get_flags() Zhengchao Shao
2022-08-27 18:46 ` Cong Wang
2022-08-29  1:26   ` shaozhengchao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).