Skip to content

Commit

Permalink
Merge tag 'batadv-next-pullrequest-20220508' of git://git.open-mesh.o…
Browse files Browse the repository at this point in the history
…rg/linux-merge

This cleanup patchset includes the following patches:

 - bump version strings, by Simon Wunderlich

 - remove unnecessary type castings, by Yu Zhe

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 8, 2022
2 parents eb60020 + 8864d2f commit c908565
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions net/batman-adv/bridge_loop_avoidance.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ batadv_bla_send_announce(struct batadv_priv *bat_priv,
*/
static inline u32 batadv_choose_claim(const void *data, u32 size)
{
struct batadv_bla_claim *claim = (struct batadv_bla_claim *)data;
const struct batadv_bla_claim *claim = data;
u32 hash = 0;

hash = jhash(&claim->addr, sizeof(claim->addr), hash);
Expand All @@ -86,7 +86,7 @@ static inline u32 batadv_choose_backbone_gw(const void *data, u32 size)
const struct batadv_bla_backbone_gw *gw;
u32 hash = 0;

gw = (struct batadv_bla_backbone_gw *)data;
gw = data;
hash = jhash(&gw->orig, sizeof(gw->orig), hash);
hash = jhash(&gw->vid, sizeof(gw->vid), hash);

Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define BATADV_DRIVER_DEVICE "batman-adv"

#ifndef BATADV_SOURCE_VERSION
#define BATADV_SOURCE_VERSION "2022.1"
#define BATADV_SOURCE_VERSION "2022.2"
#endif

/* B.A.T.M.A.N. parameters */
Expand Down
12 changes: 6 additions & 6 deletions net/batman-adv/translation-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ static bool batadv_compare_tt(const struct hlist_node *node, const void *data2)
*/
static inline u32 batadv_choose_tt(const void *data, u32 size)
{
struct batadv_tt_common_entry *tt;
const struct batadv_tt_common_entry *tt;
u32 hash = 0;

tt = (struct batadv_tt_common_entry *)data;
tt = data;
hash = jhash(&tt->addr, ETH_ALEN, hash);
hash = jhash(&tt->vid, sizeof(tt->vid), hash);

Expand Down Expand Up @@ -2766,7 +2766,7 @@ static void batadv_tt_tvlv_generate(struct batadv_priv *bat_priv,
u32 i;

tt_tot = batadv_tt_entries(tt_len);
tt_change = (struct batadv_tvlv_tt_change *)tvlv_buff;
tt_change = tvlv_buff;

if (!valid_cb)
return;
Expand Down Expand Up @@ -3994,7 +3994,7 @@ static void batadv_tt_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv,
if (tvlv_value_len < sizeof(*tt_data))
return;

tt_data = (struct batadv_tvlv_tt_data *)tvlv_value;
tt_data = tvlv_value;
tvlv_value_len -= sizeof(*tt_data);

num_vlan = ntohs(tt_data->num_vlan);
Expand Down Expand Up @@ -4037,7 +4037,7 @@ static int batadv_tt_tvlv_unicast_handler_v1(struct batadv_priv *bat_priv,
if (tvlv_value_len < sizeof(*tt_data))
return NET_RX_SUCCESS;

tt_data = (struct batadv_tvlv_tt_data *)tvlv_value;
tt_data = tvlv_value;
tvlv_value_len -= sizeof(*tt_data);

tt_vlan_len = sizeof(struct batadv_tvlv_tt_vlan_data);
Expand Down Expand Up @@ -4129,7 +4129,7 @@ static int batadv_roam_tvlv_unicast_handler_v1(struct batadv_priv *bat_priv,
goto out;

batadv_inc_counter(bat_priv, BATADV_CNT_TT_ROAM_ADV_RX);
roaming_adv = (struct batadv_tvlv_roam_adv *)tvlv_value;
roaming_adv = tvlv_value;

batadv_dbg(BATADV_DBG_TT, bat_priv,
"Received ROAMING_ADV from %pM (client %pM)\n",
Expand Down

0 comments on commit c908565

Please sign in to comment.