[PATCH 2/3] ath10k: Ensure peer_map references are cleaned up.

Michal Kazior michal.kazior at tieto.com
Thu Mar 31 23:18:21 PDT 2016


On 31 March 2016 at 22:59,  <greearb at candelatech.com> wrote:
[...]
> @@ -812,6 +813,15 @@ static void ath10k_peer_cleanup(struct ath10k *ar, u32 vdev_id)
>                         ar->peer_map[peer_id] = NULL;
>                 }
>
> +               /* Double check that peer is properly un-referenced from the peer_map */
> +               for (i = 0; i < ARRAY_SIZE(ar->peer_map); i++) {
> +                       if (ar->peer_map[i] == peer) {
> +                               ath10k_warn(ar, "ERROR:  Faile to properly clean up peer: %p %pM, idx: %d, will fix.\n",
> +                                           peer, peer->addr, i);

The message doesn't fit the style and has typos. I think it's more
in-line with the preceeding warning to:
  "removing stale peer_map entry for %pM (ptr %p idx %d)"


[...]
> @@ -850,6 +861,11 @@ static void ath10k_peer_cleanup_all(struct ath10k *ar)
>                 list_del(&peer->list);
>                 kfree(peer);
>         }
> +
> +       /* Clean up peer-map */

No need for the comment.

> +       for (i = 0; i < ARRAY_SIZE(ar->peer_map); i++)
> +               ar->peer_map[i] = NULL;

Could use memset() as well?


Anyway, thanks for catching these! :)


Michał



More information about the ath10k mailing list