[PATCH] staging: rtl8192u: r8192U_core: Removed variables that is never used

From: Rickard Strandqvist
Date: Sat Jan 31 2015 - 09:52:03 EST


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@xxxxxxxxxxxxxxxxxx>
---
drivers/staging/rtl8192u/r8192U_core.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index e031a25..2c347d0 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -950,7 +950,6 @@ static void rtl8192_data_hard_resume(struct net_device *dev)
static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rate)
{
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
- int ret;
unsigned long flags;
cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
u8 queue_index = tcb_desc->queue_index;
@@ -963,7 +962,7 @@ static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));
tcb_desc->bTxEnableFwCalcDur = 1;
skb_push(skb, priv->ieee80211->tx_headroom);
- ret = rtl8192_tx(dev, skb);
+ rtl8192_tx(dev, skb);

spin_unlock_irqrestore(&priv->tx_lock, flags);

@@ -2530,7 +2529,6 @@ static short rtl8192_init(struct net_device *dev)
memset(priv->txqueue_to_outpipemap, 0, 9);
#ifdef PIPE12
{
- int i = 0;
u8 queuetopipe[] = {3, 2, 1, 0, 4, 8, 7, 6, 5};
memcpy(priv->txqueue_to_outpipemap, queuetopipe, 9);
}
@@ -3393,7 +3391,6 @@ int rtl8192_down(struct net_device *dev)
void rtl8192_commit(struct net_device *dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
- int reset_status = 0;
if (priv->up == 0)
return;
priv->up = 0;
@@ -3404,7 +3401,7 @@ void rtl8192_commit(struct net_device *dev)
ieee80211_softmac_stop_protocol(priv->ieee80211);

rtl8192_rtx_disable(dev);
- reset_status = _rtl8192_up(dev);
+ _rtl8192_up(dev);

}

@@ -3718,10 +3715,9 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,

struct ieee80211_hdr_3addr *hdr;
u16 sc;
- unsigned int frag, seq;
+ unsigned int seq;
hdr = (struct ieee80211_hdr_3addr *)buffer;
sc = le16_to_cpu(hdr->seq_ctl);
- frag = WLAN_GET_SEQ_FRAG(sc);
seq = WLAN_GET_SEQ_SEQ(sc);
//cosa add 04292008 to record the sequence number
pcurrent_stats->Seq_Num = seq;
--
1.7.10.4

--
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/