mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 09:51:21 -04:00
batman-adv: make tt_global_add static and return bool
batadv_tt_global_add is not used anymore outside of the TT
code thanks to the TVLV implementation. It can therefore be
declared as static
Last user has been removed by 3de4e64df0f1326db7cc0ef25f5af8522850252d
("batman-adv: tvlv - convert roaming adv packet to use tvlv unicast packets")
Moreover make it return bool since its result can be either 0 or 1.
Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
This commit is contained in:
committed by
Antonio Quartulli
parent
97dbc03b47
commit
1e5d49fce3
@@ -805,15 +805,17 @@ batadv_tt_global_orig_entry_add(struct batadv_tt_global_entry *tt_global,
|
||||
* If a TT local entry exists for this non-mesh client remove it.
|
||||
*
|
||||
* The caller must hold orig_node refcount.
|
||||
*
|
||||
* Return true if the new entry has been added, false otherwise
|
||||
*/
|
||||
int batadv_tt_global_add(struct batadv_priv *bat_priv,
|
||||
struct batadv_orig_node *orig_node,
|
||||
const unsigned char *tt_addr, uint16_t flags,
|
||||
uint8_t ttvn)
|
||||
static bool batadv_tt_global_add(struct batadv_priv *bat_priv,
|
||||
struct batadv_orig_node *orig_node,
|
||||
const unsigned char *tt_addr, uint16_t flags,
|
||||
uint8_t ttvn)
|
||||
{
|
||||
struct batadv_tt_global_entry *tt_global_entry;
|
||||
struct batadv_tt_local_entry *tt_local_entry;
|
||||
int ret = 0;
|
||||
bool ret = false;
|
||||
int hash_added;
|
||||
struct batadv_tt_common_entry *common;
|
||||
uint16_t local_flags;
|
||||
@@ -914,7 +916,7 @@ int batadv_tt_global_add(struct batadv_priv *bat_priv,
|
||||
batadv_dbg(BATADV_DBG_TT, bat_priv,
|
||||
"Creating new global tt entry: %pM (via %pM)\n",
|
||||
common->addr, orig_node->orig);
|
||||
ret = 1;
|
||||
ret = true;
|
||||
|
||||
out_remove:
|
||||
|
||||
|
||||
@@ -30,10 +30,6 @@ int batadv_tt_local_seq_print_text(struct seq_file *seq, void *offset);
|
||||
void batadv_tt_global_add_orig(struct batadv_priv *bat_priv,
|
||||
struct batadv_orig_node *orig_node,
|
||||
const unsigned char *tt_buff, int tt_buff_len);
|
||||
int batadv_tt_global_add(struct batadv_priv *bat_priv,
|
||||
struct batadv_orig_node *orig_node,
|
||||
const unsigned char *addr, uint16_t flags,
|
||||
uint8_t ttvn);
|
||||
int batadv_tt_global_seq_print_text(struct seq_file *seq, void *offset);
|
||||
void batadv_tt_global_del_orig(struct batadv_priv *bat_priv,
|
||||
struct batadv_orig_node *orig_node,
|
||||
|
||||
Reference in New Issue
Block a user