Clean up W=1 warning: variable set but not used. Signed-off-by: Kenneth Lu <kuohsianglu@xxxxxxxxx> --- v2: Rollback r8192U_core.c for the incorrect removed variables. --- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 -- drivers/staging/rtl8192u/r8192U_core.c | 7 +------ drivers/staging/rtl8192u/r8192U_dm.c | 3 +-- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c index 37a610d..535186b 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c @@ -893,7 +893,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, u16 fc, type, stype, sc; struct net_device_stats *stats; unsigned int frag; - u8 *payload; u16 ethertype; //added by amy for reorder u8 TID = 0; @@ -1274,7 +1273,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, } //added by amy for reorder /* skb: hdr + (possible reassembled) full plaintext payload */ - payload = skb->data + hdrlen; //ethertype = (payload[6] << 8) | payload[7]; rxb = kmalloc(sizeof(struct ieee80211_rxb), GFP_ATOMIC); if (!rxb) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index d607c59..d2367f8 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -3971,11 +3971,10 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, struct rtl_80211_hdr_3addr *hdr; u16 sc; - unsigned int frag, seq; + unsigned int seq; hdr = (struct rtl_80211_hdr_3addr *)buffer; sc = le16_to_cpu(hdr->seq_ctl); - frag = WLAN_GET_SEQ_FRAG(sc); seq = WLAN_GET_SEQ_SEQ(sc); /* to record the sequence number */ pcurrent_stats->Seq_Num = seq; @@ -4811,14 +4810,10 @@ static void rtl819xusb_process_received_packet( struct net_device *dev, struct ieee80211_rx_stats *pstats) { - u8 *frame; - u16 frame_len = 0; struct r8192_priv *priv = ieee80211_priv(dev); /* Get shifted bytes of Starting address of 802.11 header. */ pstats->virtual_address += get_rxpacket_shiftbytes_819xusb(pstats); - frame = pstats->virtual_address; - frame_len = pstats->packetlength; #ifdef TODO /* about HCT */ if (!Adapter->bInHctTest) CountRxErrStatistics(Adapter, pRfd); diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c index e1b81d34..44aca291 100644 --- a/drivers/staging/rtl8192u/r8192U_dm.c +++ b/drivers/staging/rtl8192u/r8192U_dm.c @@ -509,7 +509,7 @@ static u8 CCKSwingTable_Ch14[CCK_Table_length][8] = { static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); - bool bHighpowerstate, viviflag = false; + bool viviflag = false; DCMD_TXCMD_T tx_cmd; u8 powerlevelOFDM24G; int i = 0, j = 0, k = 0; @@ -524,7 +524,6 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev) write_nic_byte(dev, 0x1ba, 0); priv->ieee80211->bdynamic_txpower_enable = false; - bHighpowerstate = priv->bDynamicTxHighPower; powerlevelOFDM24G = (u8)(priv->Pwr_Track>>24); RF_Type = priv->rf_type; -- 2.7.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel