]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: remove redundant NULL check in change hook function
authorZhengchao Shao <shaozhengchao@huawei.com>
Mon, 29 Aug 2022 07:12:19 +0000 (15:12 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 1 Sep 2022 06:06:45 +0000 (08:06 +0200)
commiteb46b399c6ab2471ee1b0ac92ec65cee2f9efaa6
treeb79d8ca008bc816a2521cb817529ba4a43591944
parenta25c52a3fa35855afc54c3b898eaba52dba0c9d8
net: sched: remove redundant NULL check in change hook function

Currently, the change function can be called by two ways. The one way is
that qdisc_change() will call it. Before calling change function,
qdisc_change() ensures tca[TCA_OPTIONS] is not empty. The other way is
that .init() will call it. The opt parameter is also checked before
calling change function in .init(). Therefore, it's no need to check the
input parameter opt in change function.

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Link: https://lore.kernel.org/r/20220829071219.208646-1-shaozhengchao@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
13 files changed:
net/sched/sch_cake.c
net/sched/sch_codel.c
net/sched/sch_ets.c
net/sched/sch_fq.c
net/sched/sch_fq_codel.c
net/sched/sch_fq_pie.c
net/sched/sch_gred.c
net/sched/sch_hfsc.c
net/sched/sch_hhf.c
net/sched/sch_netem.c
net/sched/sch_pie.c
net/sched/sch_plug.c
net/sched/sch_red.c