public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <mareklindner@neomailbox.ch>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH maint] batman-adv: Fix broken capability checks
Date: Fri, 03 Jul 2015 19:13:02 +0800	[thread overview]
Message-ID: <2779160.PvUSbAU1eu@voltaire> (raw)
In-Reply-To: <1435811430-6949-1-git-send-email-linus.luessing@c0d3.blue>

[-- Attachment #1: Type: text/plain, Size: 1408 bytes --]

On Thursday, July 02, 2015 06:30:30 Linus Lüssing wrote:
> Fixes: bfd0fbaef270 ("batman-adv: Make DAT capability changes atomic")
> Fixes: 586df9e2537b ("batman-adv: Make NC capability changes atomic")
> Fixes: a51fa16ecf3f ("batman-adv: Make TT capability changes atomic")
> Fixes: 201a54ba710a ("batman-adv: Make MCAST capability changes atomic")

Can we please split these patches too ? Antonio needs to merge the patch pairs 
before submitting them.


> @@ -422,7 +422,7 @@ static bool batadv_is_orig_node_eligible(struct
> batadv_dat_candidate *res, int j;
> 
>  	/* check if orig node candidate is running DAT */
> -	if (!(candidate->capabilities & BATADV_ORIG_CAPA_HAS_DAT))
> +	if (!(candidate->capabilities & BIT(BATADV_ORIG_CAPA_HAS_DAT)))
>  		goto out;

How about using test_bit() to be consistent ?


> @@ -299,10 +299,10 @@ struct batadv_orig_node {
>   *  (= orig node announces a tvlv of type BATADV_TVLV_MCAST)
>   */
>  enum batadv_orig_capabilities {
> -	BATADV_ORIG_CAPA_HAS_DAT = BIT(0),
> -	BATADV_ORIG_CAPA_HAS_NC = BIT(1),
> -	BATADV_ORIG_CAPA_HAS_TT = BIT(2),
> -	BATADV_ORIG_CAPA_HAS_MCAST = BIT(3),
> +	BATADV_ORIG_CAPA_HAS_DAT,
> +	BATADV_ORIG_CAPA_HAS_NC,
> +	BATADV_ORIG_CAPA_HAS_TT,
> +	BATADV_ORIG_CAPA_HAS_MCAST,
>  };

Do we need an initialization of the first element or can we rely on the 
compiler to start with 0 ?

Cheers,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  parent reply	other threads:[~2015-07-03 11:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02  4:30 [B.A.T.M.A.N.] [PATCH maint] batman-adv: Fix broken capability checks Linus Lüssing
2015-07-02 20:34 ` Linus Lüssing
2015-07-03 11:13 ` Marek Lindner [this message]
2015-07-03 11:40   ` Sven Eckelmann

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=2779160.PvUSbAU1eu@voltaire \
    --to=mareklindner@neomailbox.ch \
    --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