diff options
author | Jiri Pirko <jiri@mellanox.com> | 2017-10-11 10:41:07 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-12 06:15:42 +0300 |
commit | 843e79d05addd8eb06992cd6dfafc7b9d53f2bc8 (patch) | |
tree | a8f2d384369cbf8834961bf51a9a67ee5b8947f3 /net/sched/cls_api.c | |
parent | 7c6a86b4cd1b0134a4768505ce10e4ef3b9b0213 (diff) | |
download | linux-843e79d05addd8eb06992cd6dfafc7b9d53f2bc8.tar.xz |
net: sched: make tc_action_ops->get_dev return dev and avoid passing net
Return dev directly, NULL if not possible. That is enough.
Makes no sense to pass struct net * to get_dev op, as there is only one
net possible, the one the action was created in. So just store it in
mirred priv and use directly.
Rename the mirred op callback function.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r-- | net/sched/cls_api.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 0b2219adf520..450873b0c4b9 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -1016,10 +1016,8 @@ int tcf_exts_get_dev(struct net_device *dev, struct tcf_exts *exts, tcf_exts_to_list(exts, &actions); list_for_each_entry(a, &actions, list) { - if (a->ops->get_dev) { - a->ops->get_dev(a, dev_net(dev), hw_dev); - break; - } + if (a->ops->get_dev) + *hw_dev = a->ops->get_dev(a); } if (*hw_dev) return 0; |