b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: "Linus Lüssing" <linus.luessing@c0d3.blue>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix mcast_flags debugfs output
Date: Fri, 13 May 2016 18:35:41 +0200	[thread overview]
Message-ID: <1463157342-13195-2-git-send-email-linus.luessing@c0d3.blue> (raw)
In-Reply-To: <1463157342-13195-1-git-send-email-linus.luessing@c0d3.blue>

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(-)

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;
 			}
-- 
1.7.10.4


  reply	other threads:[~2016-05-13 16:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13 16:35 [B.A.T.M.A.N.] [PATCHv5 1/2] batctl: adding multicast debug level Linus Lüssing
2016-05-13 16:35 ` Linus Lüssing [this message]
2016-05-17  9:24   ` [B.A.T.M.A.N.] [PATCH] batman-adv: Fix mcast_flags debugfs output Marek Lindner
2016-05-13 16:35 ` [B.A.T.M.A.N.] [PATCHv5 2/2] batctl: adding mcast flags debugfs table Linus Lüssing
2016-05-17  9:14   ` Marek Lindner
  -- strict thread matches above, loose matches on Subject: below --
2016-05-13 16:24 [B.A.T.M.A.N.] [PATCH] batman-adv: Fix mcast_flags debugfs output Linus Lüssing

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=1463157342-13195-2-git-send-email-linus.luessing@c0d3.blue \
    --to=linus.luessing@c0d3.blue \
    --cc=b.a.t.m.a.n@lists.open-mesh.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).