On Fri, May 27, 2016 at 03:48:37PM +0200, Sven Eckelmann wrote: > On Wednesday 25 May 2016 23:27:35 Antonio Quartulli wrote: > > +#ifdef CONFIG_BATMAN_ADV_BATMAN_V > > +struct batadv_gw_node *batadv_gw_node_get(struct batadv_priv *bat_priv, > > + struct batadv_orig_node > > *orig_node); > > +#endif /* CONFIG_BATMAN_ADV_BATMAN_V */ > > This is rather odd because the function is also compiled (and used) even when > CONFIG_BATMAN_ADV_BATMAN_V is not enabled. > > Here is the relevant diff: > > > @@ -356,9 +360,8 @@ static void batadv_gw_node_add(struct batadv_priv > > *bat_priv, > > * > > * Return: gateway node if found or NULL otherwise. > > */ > > -static struct batadv_gw_node * > > -batadv_gw_node_get(struct batadv_priv *bat_priv, > > - struct batadv_orig_node *orig_node) > > +struct batadv_gw_node *batadv_gw_node_get(struct batadv_priv *bat_priv, > > + struct batadv_orig_node > > *orig_node) > > { > > struct batadv_gw_node *gw_node_tmp, *gw_node = NULL; > > > > Maybe you should drop the CONFIG_BATMAN_ADV_BATMAN_V check. > > But I should at least whitelist the batadv_gw_node_get for the unused symbols > check.
This is exactly the point: when CONFIG_BATMAN_ADV_BATMAN_V is not selected this exported symbol is not used. Therefore I was not confident if the right way to go was to put the declaration within the #ifdef block or not.. Do you think it makes more sense to keep the declaration and whitelist the function in your test ? Cheers, -- Antonio Quartulli
signature.asc
Description: Digital signature