hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/net/sched/sch_atm.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /* net/sched/sch_atm.c - ATM VC selection "queueing discipline" */
23
34 /* Written 1998-2000 by Werner Almesberger, EPFL ICA */
....@@ -57,7 +58,7 @@
5758 struct atm_flow_data *excess; /* flow for excess traffic;
5859 NULL to set CLP instead */
5960 int hdr_len;
60
- unsigned char hdr[0]; /* header data; MUST BE LAST */
61
+ unsigned char hdr[]; /* header data; MUST BE LAST */
6162 };
6263
6364 struct atm_qdisc_data {
....@@ -223,7 +224,8 @@
223224 if (opt == NULL)
224225 return -EINVAL;
225226
226
- error = nla_parse_nested(tb, TCA_ATM_MAX, opt, atm_policy, NULL);
227
+ error = nla_parse_nested_deprecated(tb, TCA_ATM_MAX, opt, atm_policy,
228
+ NULL);
227229 if (error < 0)
228230 return error;
229231
....@@ -573,7 +575,6 @@
573575 pr_debug("atm_tc_reset(sch %p,[qdisc %p])\n", sch, p);
574576 list_for_each_entry(flow, &p->flows, list)
575577 qdisc_reset(flow->q);
576
- sch->q.qlen = 0;
577578 }
578579
579580 static void atm_tc_destroy(struct Qdisc *sch)
....@@ -609,7 +610,7 @@
609610 tcm->tcm_handle = flow->common.classid;
610611 tcm->tcm_info = flow->q->handle;
611612
612
- nest = nla_nest_start(skb, TCA_OPTIONS);
613
+ nest = nla_nest_start_noflag(skb, TCA_OPTIONS);
613614 if (nest == NULL)
614615 goto nla_put_failure;
615616