From: Antonio Quartulli <antonio@meshcoding.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
Antonio Quartulli <antonio@meshcoding.com>,
Marek Lindner <mareklindner@neomailbox.ch>
Subject: [PATCH 07/15] batman-adv: checkpatch - else is not generally useful after a break or return
Date: Thu, 8 Jan 2015 16:15:12 +0100 [thread overview]
Message-ID: <1420730120-9844-8-git-send-email-antonio@meshcoding.com> (raw)
In-Reply-To: <1420730120-9844-1-git-send-email-antonio@meshcoding.com>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
---
net/batman-adv/bitarray.h | 3 +--
net/batman-adv/fragmentation.h | 3 +--
net/batman-adv/network-coding.c | 3 +--
net/batman-adv/translation-table.c | 5 ++---
4 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/net/batman-adv/bitarray.h b/net/batman-adv/bitarray.h
index cc24073..2acaafe 100644
--- a/net/batman-adv/bitarray.h
+++ b/net/batman-adv/bitarray.h
@@ -29,8 +29,7 @@ static inline int batadv_test_bit(const unsigned long *seq_bits,
diff = last_seqno - curr_seqno;
if (diff < 0 || diff >= BATADV_TQ_LOCAL_WINDOW_SIZE)
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 */
diff --git a/net/batman-adv/fragmentation.h b/net/batman-adv/fragmentation.h
index 5d7a0e6..d848cf6 100644
--- a/net/batman-adv/fragmentation.h
+++ b/net/batman-adv/fragmentation.h
@@ -41,8 +41,7 @@ batadv_frag_check_entry(struct batadv_frag_table_entry *frags_entry)
if (!hlist_empty(&frags_entry->head) &&
batadv_has_timed_out(frags_entry->timestamp, BATADV_FRAG_TIMEOUT))
return true;
- else
- return false;
+ return false;
}
#endif /* _NET_BATMAN_ADV_FRAGMENTATION_H_ */
diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c
index fab47f1..127cc4d 100644
--- a/net/batman-adv/network-coding.c
+++ b/net/batman-adv/network-coding.c
@@ -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))
return false;
- else
- return true;
+ return true;
}
/**
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 5f59e7f..38a804e 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -2769,9 +2769,8 @@ static bool batadv_send_tt_response(struct batadv_priv *bat_priv,
{
if (batadv_is_my_mac(bat_priv, req_dst))
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, req_dst);
+ return batadv_send_other_tt_response(bat_priv, tt_data, req_src,
+ req_dst);
}
static void _batadv_tt_update_changes(struct batadv_priv *bat_priv,
--
2.2.1
next prev parent reply other threads:[~2015-01-08 15:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 15:15 pull request: batman-adv 20150108 Antonio Quartulli
2015-01-08 15:15 ` [PATCH 03/15] batman-adv: kernel doc fixes for bat_iv_ogm.c Antonio Quartulli
2015-01-08 15:15 ` [PATCH 05/15] batman-adv: kernel doc fix for distributed-arp-table.h Antonio Quartulli
[not found] ` <1420730120-9844-1-git-send-email-antonio-x4xJYDvStAgysxA8WJXlww@public.gmane.org>
2015-01-08 15:15 ` [PATCH 01/15] batman-adv: avoid useless return in void functions Antonio Quartulli
2015-01-08 15:15 ` [PATCH 02/15] batman-adv: remove obsolete variable primary_iface from orig_node Antonio Quartulli
2015-01-08 15:15 ` [PATCH 04/15] batman-adv: kernel doc fixes for bridge_loop_avoidance.c Antonio Quartulli
2015-01-08 15:15 ` [PATCH 06/15] batman-adv: kernel doc fixes for main.{c, h} Antonio Quartulli
2015-01-08 15:15 ` [PATCH 14/15] batman-adv: Start new development cycle Antonio Quartulli
2015-01-08 15:15 ` [PATCH 15/15] batman-adv: Kconfig, Add missing DEBUG_FS dependency Antonio Quartulli
2015-01-08 15:15 ` Antonio Quartulli [this message]
2015-01-08 15:15 ` [PATCH 08/15] batman-adv: checkpatch - No space is necessary after a cast Antonio Quartulli
2015-01-08 15:15 ` [PATCH 09/15] batman-adv: checkpatch - Please use a blank line after declarations Antonio Quartulli
2015-01-08 15:15 ` [PATCH 10/15] batman-adv: checkpatch - Please don't use multiple blank lines Antonio Quartulli
2015-01-08 15:15 ` [PATCH 11/15] batman-adv: checkpatch - remove unnecessary parentheses Antonio Quartulli
2015-01-08 15:15 ` [PATCH 12/15] batman-adv: clear control block of received socket buffers Antonio Quartulli
2015-01-08 15:15 ` [PATCH 13/15] batman-adv: fix misspelled words Antonio Quartulli
2015-01-09 4:14 ` pull request: batman-adv 20150108 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1420730120-9844-8-git-send-email-antonio@meshcoding.com \
--to=antonio@meshcoding.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=mareklindner@neomailbox.ch \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).