提交 24820df1 编写于 作者: A Antonio Quartulli

batman-adv: checkpatch - else is not generally useful after a break or return

Signed-off-by: NAntonio Quartulli <antonio@meshcoding.com>
Signed-off-by: NMarek Lindner <mareklindner@neomailbox.ch>
上级 a0e28775
...@@ -29,8 +29,7 @@ static inline int batadv_test_bit(const unsigned long *seq_bits, ...@@ -29,8 +29,7 @@ static inline int batadv_test_bit(const unsigned long *seq_bits,
diff = last_seqno - curr_seqno; diff = last_seqno - curr_seqno;
if (diff < 0 || diff >= BATADV_TQ_LOCAL_WINDOW_SIZE) if (diff < 0 || diff >= BATADV_TQ_LOCAL_WINDOW_SIZE)
return 0; return 0;
else return test_bit(diff, seq_bits) != 0;
return test_bit(diff, seq_bits) != 0;
} }
/* turn corresponding bit on, so we can remember that we got the packet */ /* turn corresponding bit on, so we can remember that we got the packet */
......
...@@ -41,8 +41,7 @@ batadv_frag_check_entry(struct batadv_frag_table_entry *frags_entry) ...@@ -41,8 +41,7 @@ batadv_frag_check_entry(struct batadv_frag_table_entry *frags_entry)
if (!hlist_empty(&frags_entry->head) && if (!hlist_empty(&frags_entry->head) &&
batadv_has_timed_out(frags_entry->timestamp, BATADV_FRAG_TIMEOUT)) batadv_has_timed_out(frags_entry->timestamp, BATADV_FRAG_TIMEOUT))
return true; return true;
else return false;
return false;
} }
#endif /* _NET_BATMAN_ADV_FRAGMENTATION_H_ */ #endif /* _NET_BATMAN_ADV_FRAGMENTATION_H_ */
...@@ -1212,8 +1212,7 @@ static bool batadv_nc_skb_coding_possible(struct sk_buff *skb, ...@@ -1212,8 +1212,7 @@ static bool batadv_nc_skb_coding_possible(struct sk_buff *skb,
{ {
if (BATADV_SKB_CB(skb)->decoded && !batadv_compare_eth(dst, src)) if (BATADV_SKB_CB(skb)->decoded && !batadv_compare_eth(dst, src))
return false; return false;
else return true;
return true;
} }
/** /**
......
...@@ -2769,9 +2769,8 @@ static bool batadv_send_tt_response(struct batadv_priv *bat_priv, ...@@ -2769,9 +2769,8 @@ static bool batadv_send_tt_response(struct batadv_priv *bat_priv,
{ {
if (batadv_is_my_mac(bat_priv, req_dst)) if (batadv_is_my_mac(bat_priv, req_dst))
return batadv_send_my_tt_response(bat_priv, tt_data, req_src); return batadv_send_my_tt_response(bat_priv, tt_data, req_src);
else return batadv_send_other_tt_response(bat_priv, tt_data, req_src,
return batadv_send_other_tt_response(bat_priv, tt_data, req_dst);
req_src, req_dst);
} }
static void _batadv_tt_update_changes(struct batadv_priv *bat_priv, static void _batadv_tt_update_changes(struct batadv_priv *bat_priv,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册