mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-21 06:24:12 +00:00
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>
This commit is contained in:
parent
16eecd9be4
commit
80019d310f
2 changed files with 2 additions and 2 deletions
|
@ -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 (type == htons(ETH_P_8021Q) || type == htons(ETH_P_8021AD)) {
|
||||||
if (vlan_depth) {
|
if (vlan_depth) {
|
||||||
if (unlikely(WARN_ON(vlan_depth < VLAN_HLEN)))
|
if (WARN_ON(vlan_depth < VLAN_HLEN))
|
||||||
return 0;
|
return 0;
|
||||||
vlan_depth -= VLAN_HLEN;
|
vlan_depth -= VLAN_HLEN;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -144,7 +144,7 @@ int lockdep_ovsl_is_held(void);
|
||||||
#define lockdep_ovsl_is_held() 1
|
#define lockdep_ovsl_is_held() 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ASSERT_OVSL() WARN_ON(unlikely(!lockdep_ovsl_is_held()))
|
#define ASSERT_OVSL() WARN_ON(!lockdep_ovsl_is_held())
|
||||||
#define ovsl_dereference(p) \
|
#define ovsl_dereference(p) \
|
||||||
rcu_dereference_protected(p, lockdep_ovsl_is_held())
|
rcu_dereference_protected(p, lockdep_ovsl_is_held())
|
||||||
#define rcu_dereference_ovsl(p) \
|
#define rcu_dereference_ovsl(p) \
|
||||||
|
|
Loading…
Add table
Reference in a new issue