forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/net/sched/ematch.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * net/sched/ematch.c Extended Match API
3
- *
4
- * This program is free software; you can redistribute it and/or
5
- * modify it under the terms of the GNU General Public License
6
- * as published by the Free Software Foundation; either version
7
- * 2 of the License, or (at your option) any later version.
84 *
95 * Authors: Thomas Graf <tgraf@suug.ch>
106 *
....@@ -317,7 +313,8 @@
317313 if (!nla)
318314 return 0;
319315
320
- err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy, NULL);
316
+ err = nla_parse_nested_deprecated(tb, TCA_EMATCH_TREE_MAX, nla,
317
+ em_policy, NULL);
321318 if (err < 0)
322319 goto errout;
323320
....@@ -392,7 +389,6 @@
392389 /**
393390 * tcf_em_tree_destroy - destroy an ematch tree
394391 *
395
- * @tp: classifier kind handle
396392 * @tree: ematch tree to be deleted
397393 *
398394 * This functions destroys an ematch tree previously created by
....@@ -428,7 +424,7 @@
428424 * tcf_em_tree_dump - dump ematch tree into a rtnl message
429425 *
430426 * @skb: skb holding the rtnl message
431
- * @t: ematch tree to be dumped
427
+ * @tree: ematch tree to be dumped
432428 * @tlv: TLV type to be used to encapsulate the tree
433429 *
434430 * This function dumps a ematch tree into a rtnl message. It is valid to
....@@ -443,14 +439,14 @@
443439 struct nlattr *top_start;
444440 struct nlattr *list_start;
445441
446
- top_start = nla_nest_start(skb, tlv);
442
+ top_start = nla_nest_start_noflag(skb, tlv);
447443 if (top_start == NULL)
448444 goto nla_put_failure;
449445
450446 if (nla_put(skb, TCA_EMATCH_TREE_HDR, sizeof(tree->hdr), &tree->hdr))
451447 goto nla_put_failure;
452448
453
- list_start = nla_nest_start(skb, TCA_EMATCH_TREE_LIST);
449
+ list_start = nla_nest_start_noflag(skb, TCA_EMATCH_TREE_LIST);
454450 if (list_start == NULL)
455451 goto nla_put_failure;
456452