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
signature.asc
Description: This is a digitally signed message part.
