diff options
author | Yu Zhe <yuzhe@nfschina.com> | 2022-04-21 18:48:29 +0300 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2022-04-22 12:23:46 +0300 |
commit | 8864d2fcf04385cabb8c8bb159f1f2ba5790cf71 (patch) | |
tree | 0a67d97b62f2f1d231b9115208c8416433dc386e /net/batman-adv/bridge_loop_avoidance.c | |
parent | cfa4e7b1bcf85cde71a498d9f23aa84640598d71 (diff) | |
download | linux-8864d2fcf04385cabb8c8bb159f1f2ba5790cf71.tar.xz |
batman-adv: remove unnecessary type castings
remove unnecessary void* type castings.
Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
[sven@narfation.org: Fix missing const in batadv_choose* functions]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.c')
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index 7f8a14d99cdb..37ce6cfb3520 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c @@ -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); @@ -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); |