diff mbox

batman-adv: Fix mcast_flags debugfs output

Message ID 1463157342-13195-2-git-send-email-linus.luessing@c0d3.blue
State Accepted, archived
Commit 8151e97ee0a3d897a377f0e8db5731a2d1bff7c6
Delegated to: Marek Lindner
Headers show

Commit Message

Linus Lüssing May 13, 2016, 4:35 p.m. UTC
We recently switched to the atomic variants set_bit() / clear_bit()
/ test_bit() for originator capabilities.

Unfortunately, this was missed for the new multicast debugfs
entry, resulting in an empty multicast flags table.

Fixing this by using test_bit().

Fixes: f1f0fbb2c956 ("batman-adv: Add debugfs table for mcast flags")
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
---
 net/batman-adv/multicast.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Marek Lindner May 17, 2016, 9:24 a.m. UTC | #1
On Friday, May 13, 2016 18:35:41 Linus Lüssing wrote:
> We recently switched to the atomic variants set_bit() / clear_bit()
> / test_bit() for originator capabilities.
> 
> Unfortunately, this was missed for the new multicast debugfs
> entry, resulting in an empty multicast flags table.
> 
> Fixing this by using test_bit().
> 
> Fixes: f1f0fbb2c956 ("batman-adv: Add debugfs table for mcast flags")
> Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
> ---
>  net/batman-adv/multicast.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied in revision 8151e97.

Thanks,
Marek
diff mbox

Patch

diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
index abb12f1..2dd5aec 100644
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -1205,12 +1205,12 @@  int batadv_mcast_flags_seq_print_text(struct seq_file *seq, void *offset)
 
 		rcu_read_lock();
 		hlist_for_each_entry_rcu(orig_node, head, hash_entry) {
-			if (!(orig_node->capa_initialized &
-			      BATADV_ORIG_CAPA_HAS_MCAST))
+			if (!test_bit(BATADV_ORIG_CAPA_HAS_MCAST,
+				      &orig_node->capa_initialized))
 				continue;
 
-			if (!(orig_node->capabilities &
-			      BATADV_ORIG_CAPA_HAS_MCAST)) {
+			if (!test_bit(BATADV_ORIG_CAPA_HAS_MCAST,
+				      &orig_node->capabilities)) {
 				seq_printf(seq, "%pM -\n", orig_node->orig);
 				continue;
 			}