aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_u32.c
diff options
context:
space:
mode:
authorAlexander Aring <aring@mojatatu.com>2018-01-18 11:20:49 -0500
committerDavid S. Miller <davem@davemloft.net>2018-01-19 15:52:51 -0500
commit8865fdd4e1538a775c5ac2157fb8eb45bee9dc18 (patch)
tree05ccc98bb220267a71664e6bad2d16dd72ef8481 /net/sched/cls_u32.c
parentmlxsw: spectrum: Upper-bound supported FW version (diff)
downloadlinux-dev-8865fdd4e1538a775c5ac2157fb8eb45bee9dc18.tar.xz
linux-dev-8865fdd4e1538a775c5ac2157fb8eb45bee9dc18.zip
net: sched: cls: fix code style issues
This patch changes some code style issues pointed out by checkpatch inside the TC cls subsystem. Signed-off-by: Alexander Aring <aring@mojatatu.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_u32.c')
-rw-r--r--net/sched/cls_u32.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 020d328d0afd..84129b3c14e5 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -783,7 +783,7 @@ static int u32_set_parms(struct net *net, struct tcf_proto *tp,
if (handle) {
ht_down = u32_lookup_ht(ht->tp_c, handle);
- if (ht_down == NULL)
+ if (!ht_down)
return -EINVAL;
ht_down->refcnt++;
}
@@ -907,7 +907,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
size_t size;
#endif
- if (opt == NULL)
+ if (!opt)
return handle ? -EINVAL : 0;
err = nla_parse_nested(tb, TCA_U32_MAX, opt, u32_policy, NULL);
@@ -1011,7 +1011,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
htid = ht->handle;
} else {
ht = u32_lookup_ht(tp->data, TC_U32_HTID(htid));
- if (ht == NULL)
+ if (!ht)
return -EINVAL;
}
} else {
@@ -1023,7 +1023,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
return -EINVAL;
if (handle) {
- if (TC_U32_HTID(handle) && TC_U32_HTID(handle^htid))
+ if (TC_U32_HTID(handle) && TC_U32_HTID(handle ^ htid))
return -EINVAL;
handle = htid | TC_U32_NODE(handle);
err = idr_alloc_ext(&ht->handle_idr, NULL, NULL,