diff options
author | Thomas Graf <tgraf@suug.ch> | 2014-07-29 20:31:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-30 20:41:47 -0400 |
commit | 80019d310f9fb4f8c9eeda0a5d76144ad3132fdf (patch) | |
tree | b3abca44d6bdaa3760099bc4be4f7140ca5db82f /net | |
parent | 16eecd9be4b05e3216b8b12707aa6f51fb197903 (diff) |
net: Remove unlikely() for WARN_ON() conditions
No need for the unlikely(), WARN_ON() and BUG_ON() internally use
unlikely() on the condition.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 2 | ||||
-rw-r--r-- | net/openvswitch/datapath.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index e1b7cfaccd65..b370230fe1d3 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2326,7 +2326,7 @@ __be16 skb_network_protocol(struct sk_buff *skb, int *depth) | |||
2326 | */ | 2326 | */ |
2327 | if (type == htons(ETH_P_8021Q) || type == htons(ETH_P_8021AD)) { | 2327 | if (type == htons(ETH_P_8021Q) || type == htons(ETH_P_8021AD)) { |
2328 | if (vlan_depth) { | 2328 | if (vlan_depth) { |
2329 | if (unlikely(WARN_ON(vlan_depth < VLAN_HLEN))) | 2329 | if (WARN_ON(vlan_depth < VLAN_HLEN)) |
2330 | return 0; | 2330 | return 0; |
2331 | vlan_depth -= VLAN_HLEN; | 2331 | vlan_depth -= VLAN_HLEN; |
2332 | } else { | 2332 | } else { |
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h index 7ede507500d7..701b5738c38a 100644 --- a/net/openvswitch/datapath.h +++ b/net/openvswitch/datapath.h | |||
@@ -144,7 +144,7 @@ int lockdep_ovsl_is_held(void); | |||
144 | #define lockdep_ovsl_is_held() 1 | 144 | #define lockdep_ovsl_is_held() 1 |
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | #define ASSERT_OVSL() WARN_ON(unlikely(!lockdep_ovsl_is_held())) | 147 | #define ASSERT_OVSL() WARN_ON(!lockdep_ovsl_is_held()) |
148 | #define ovsl_dereference(p) \ | 148 | #define ovsl_dereference(p) \ |
149 | rcu_dereference_protected(p, lockdep_ovsl_is_held()) | 149 | rcu_dereference_protected(p, lockdep_ovsl_is_held()) |
150 | #define rcu_dereference_ovsl(p) \ | 150 | #define rcu_dereference_ovsl(p) \ |