Re: [PATCH 2/2] staging: rtl8188eu: remove unused variables

From: Sudip Mukherjee
Date: Fri Jun 12 2015 - 01:23:09 EST


On Thu, Jun 11, 2015 at 06:39:09PM +0530, Sudip Mukherjee wrote:
> These variables were being set but not used afterwards.
>
<snip>
> --- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
> @@ -147,18 +147,14 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int
> static void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
> {
> struct list_head *plist, *phead;
> - struct sta_info *psta = NULL;
> -
>
> spin_lock_bh(&pstapriv->sta_hash_lock);
>
> phead = get_list_head(&pstapriv->free_sta_queue);
> plist = phead->next;
>
> - while (phead != plist) {
> - psta = container_of(plist, struct sta_info, list);
> + while (phead != plist)
> plist = plist->next;
> - }
>
> spin_unlock_bh(&pstapriv->sta_hash_lock);
I am checking my own patch ... :)
looks like this function is not doing anything. its just getting the lock,
traversing the list, unlocking and returning.
I am guessing by the function name that the function was supposed to free
something.

Greg - please drop this series. I will try to find if something can be
freed else I will remove this function.

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/