* [PATCH] staging: rtl8188eu: core: rtw_mlme: Removed variables that is never used
@ 2015-01-31 14:44 Rickard Strandqvist
2015-01-31 16:18 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Rickard Strandqvist @ 2015-01-31 14:44 UTC (permalink / raw)
To: Greg Kroah-Hartman, navin patidar
Cc: Rickard Strandqvist, Larry Finger, Elena Oat,
Christian Engelmayer, devel, linux-kernel
Variable was assigned a value that was never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index d4632da..e2fdc13 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -638,7 +638,6 @@ exit:
void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
{
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
- struct mlme_ext_priv *pmlmeext;
spin_lock_bh(&pmlmepriv->lock);
@@ -718,8 +717,6 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
spin_unlock_bh(&pmlmepriv->lock);
rtw_os_xmit_schedule(adapter);
-
- pmlmeext = &adapter->mlmeextpriv;
}
void rtw_dummy_event_callback(struct adapter *adapter , u8 *pbuf)
@@ -2042,7 +2039,7 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len)
phtpriv->rx_ampdu_maxlen = max_ampdu_sz;
}
len = 0;
- p = rtw_get_ie(pie+sizeof(struct ndis_802_11_fixed_ie), _HT_ADD_INFO_IE_, &len, ie_len-sizeof(struct ndis_802_11_fixed_ie));
+ rtw_get_ie(pie+sizeof(struct ndis_802_11_fixed_ie), _HT_ADD_INFO_IE_, &len, ie_len-sizeof(struct ndis_802_11_fixed_ie));
/* update cur_bwmode & cur_ch_offset */
if ((pregistrypriv->cbw40_enable) &&
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: rtl8188eu: core: rtw_mlme: Removed variables that is never used
2015-01-31 14:44 [PATCH] staging: rtl8188eu: core: rtw_mlme: Removed variables that is never used Rickard Strandqvist
@ 2015-01-31 16:18 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2015-01-31 16:18 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Greg Kroah-Hartman, navin patidar, devel, linux-kernel,
Elena Oat, Larry Finger
On Sat, Jan 31, 2015 at 03:44:33PM +0100, Rickard Strandqvist wrote:
> Variable was assigned a value that was never used.
> I have also removed all the code that thereby serves no purpose.
>
> This was found using a static code analysis program called cppcheck
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
> @@ -2042,7 +2039,7 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len)
> phtpriv->rx_ampdu_maxlen = max_ampdu_sz;
> }
> len = 0;
> - p = rtw_get_ie(pie+sizeof(struct ndis_802_11_fixed_ie), _HT_ADD_INFO_IE_, &len, ie_len-sizeof(struct ndis_802_11_fixed_ie));
> + rtw_get_ie(pie+sizeof(struct ndis_802_11_fixed_ie), _HT_ADD_INFO_IE_, &len, ie_len-sizeof(struct ndis_802_11_fixed_ie));
Nope.
And delete the "len = 0" line as well.
Rickard, these are too many patches and you didn't think about them
carefully enough. I'm not reviewing the rest.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-31 16:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-31 14:44 [PATCH] staging: rtl8188eu: core: rtw_mlme: Removed variables that is never used Rickard Strandqvist
2015-01-31 16:18 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.