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/rtl8192e/rtl8192e/rtl_core.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 5615c80..d6c1424 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -1369,24 +1369,12 @@ static enum reset_type rtl819x_TxCheckStuck(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); u8 QueueID; - u8 ResetThreshold = NIC_SEND_HANG_THRESHOLD_POWERSAVE; bool bCheckFwTxCnt = false; struct rtl8192_tx_ring *ring = NULL; struct sk_buff *skb = NULL; struct cb_desc *tcb_desc = NULL; unsigned long flags = 0; - switch (priv->rtllib->ps) { - case RTLLIB_PS_DISABLED: - ResetThreshold = NIC_SEND_HANG_THRESHOLD_NORMAL; - break; - case (RTLLIB_PS_MBCAST|RTLLIB_PS_UNICAST): - ResetThreshold = NIC_SEND_HANG_THRESHOLD_POWERSAVE; - break; - default: - ResetThreshold = NIC_SEND_HANG_THRESHOLD_POWERSAVE; - break; - } spin_lock_irqsave(&priv->irq_th_lock, flags); for (QueueID = 0; QueueID < MAX_TX_QUEUE; QueueID++) { if (QueueID == TXCMD_QUEUE) @@ -2000,8 +1988,8 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) MAX_DEV_ADDR_SIZE); struct tx_desc *pdesc = NULL; struct rtllib_hdr_1addr *header = NULL; - u16 fc = 0, type = 0, stype = 0; - bool multi_addr = false, broad_addr = false, uni_addr = false; + u16 fc = 0, type = 0; + bool multi_addr = false, uni_addr = false; u8 *pda_addr = NULL; int idx; u32 fwinfo_size = 0; @@ -2020,14 +2008,11 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) header = (struct rtllib_hdr_1addr *)(((u8 *)skb->data) + fwinfo_size); fc = le16_to_cpu(header->frame_ctl); type = WLAN_FC_GET_TYPE(fc); - stype = WLAN_FC_GET_STYPE(fc); pda_addr = header->addr1; - if (is_broadcast_ether_addr(pda_addr)) - broad_addr = true; - else if (is_multicast_ether_addr(pda_addr)) + if (is_multicast_ether_addr(pda_addr)) multi_addr = true; - else + else if (!is_broadcast_ether_addr(pda_addr)) uni_addr = true; if (uni_addr) @@ -3017,8 +3002,6 @@ static void rtl8192_pci_disconnect(struct pci_dev *pdev) release_mem_region(pci_resource_start(pdev, 1), pci_resource_len(pdev, 1)); } - } else { - priv = rtllib_priv(dev); } pci_disable_device(pdev); -- 1.7.10.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel