net: Remove unlikely() for WARN_ON() conditions
authorThomas Graf <tgraf@suug.ch>
Wed, 30 Jul 2014 00:31:08 +0000 (02:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Jul 2014 00:41:47 +0000 (17:41 -0700)
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>
net/core/dev.c
net/openvswitch/datapath.h

index e1b7cfaccd65243fea705868e6a7f8d784acef72..b370230fe1d3f27ee1f77c32f079d5e28da09b3c 100644 (file)
@@ -2326,7 +2326,7 @@ __be16 skb_network_protocol(struct sk_buff *skb, int *depth)
         */
        if (type == htons(ETH_P_8021Q) || type == htons(ETH_P_8021AD)) {
                if (vlan_depth) {
-                       if (unlikely(WARN_ON(vlan_depth < VLAN_HLEN)))
+                       if (WARN_ON(vlan_depth < VLAN_HLEN))
                                return 0;
                        vlan_depth -= VLAN_HLEN;
                } else {
index 7ede507500d7daa1cca3d352f9923122f5e63709..701b5738c38a634285f331e4e05288ed557e6332 100644 (file)
@@ -144,7 +144,7 @@ int lockdep_ovsl_is_held(void);
 #define lockdep_ovsl_is_held() 1
 #endif
 
-#define ASSERT_OVSL()          WARN_ON(unlikely(!lockdep_ovsl_is_held()))
+#define ASSERT_OVSL()          WARN_ON(!lockdep_ovsl_is_held())
 #define ovsl_dereference(p)                                    \
        rcu_dereference_protected(p, lockdep_ovsl_is_held())
 #define rcu_dereference_ovsl(p)                                        \