From: Marek Lindner Date: Wed, 17 Apr 2013 20:56:03 +0000 (+0800) Subject: batman-adv: do not print orig nodes without nc neighbors on nc table print X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa27c31265f111ff73d948a5846a3f193376491e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git batman-adv: do not print orig nodes without nc neighbors on nc table print Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c index 0787a34609b9..22cd51fea730 100644 --- a/net/batman-adv/network-coding.c +++ b/net/batman-adv/network-coding.c @@ -1763,6 +1763,13 @@ int batadv_nc_nodes_seq_print_text(struct seq_file *seq, void *offset) /* For each orig_node in this bin */ rcu_read_lock(); hlist_for_each_entry_rcu(orig_node, head, hash_entry) { + /* no need to print the orig node if it does not have + * network coding neighbors + */ + if (list_empty(&orig_node->in_coding_list) && + list_empty(&orig_node->out_coding_list)) + continue; + seq_printf(seq, "Node: %pM\n", orig_node->orig); seq_puts(seq, " Ingoing: ");