diff options
author | Bhaktipriya Shridhar <bhaktipriya96@gmail.com> | 2016-02-19 03:13:56 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 15:12:06 -0800 |
commit | 7949be663f7d3693cde96bb65fc3cb3b981c5700 (patch) | |
tree | 37e242af26aab7532b8c9e0a4ac9004de2990894 /drivers/staging/rtl8192e | |
parent | a4eed41f961901e70453159bc8ff9ac5a2f0ef6b (diff) | |
download | blackbird-op-linux-7949be663f7d3693cde96bb65fc3cb3b981c5700.tar.gz blackbird-op-linux-7949be663f7d3693cde96bb65fc3cb3b981c5700.zip |
staging: rtl8192e: Drop useless initialisation
Removed initialisation of a varible if it is immediately reassigned.
Changes were made using Coccinelle.
@@
type T;
constant C;
expression e;
identifier i;
@@
T i
- = C
;
i = e;
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_BAProc.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_rx.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac_wx.c | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index e9c4f973bba9..ba64a4f1b3a8 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -680,7 +680,7 @@ static void _rtl92e_hwconfig(struct net_device *dev) rtl92e_writeb(dev, BW_OPMODE, regBwOpMode); { - u32 ratr_value = 0; + u32 ratr_value; ratr_value = regRATR; if (priv->rf_type == RF_1T2R) @@ -1000,7 +1000,7 @@ void rtl92e_link_change(struct net_device *dev) _rtl92e_update_msr(dev); if (ieee->iw_mode == IW_MODE_INFRA || ieee->iw_mode == IW_MODE_ADHOC) { - u32 reg = 0; + u32 reg; reg = rtl92e_readl(dev, RCR); if (priv->rtllib->state == RTLLIB_LINKED) { @@ -1186,7 +1186,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, struct r8192_priv *priv = rtllib_priv(dev); dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, PCI_DMA_TODEVICE); - struct tx_fwinfo_8190pci *pTxFwInfo = NULL; + struct tx_fwinfo_8190pci *pTxFwInfo; pTxFwInfo = (struct tx_fwinfo_8190pci *)skb->data; memset(pTxFwInfo, 0, sizeof(struct tx_fwinfo_8190pci)); @@ -2235,7 +2235,7 @@ void rtl92e_disable_irq(struct net_device *dev) void rtl92e_clear_irq(struct net_device *dev) { - u32 tmp = 0; + u32 tmp; tmp = rtl92e_readl(dev, ISR); rtl92e_writel(dev, ISR, tmp); diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index ef03242113be..b6b714d676b5 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -1875,7 +1875,7 @@ void rtl92e_dm_rf_pathcheck_wq(void *data) struct r8192_priv, rfpath_check_wq); struct net_device *dev = priv->rtllib->dev; - u8 rfpath = 0, i; + u8 rfpath, i; rfpath = rtl92e_readb(dev, 0xc04); diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c index c04a020f6d6c..c7fd1b1653d6 100644 --- a/drivers/staging/rtl8192e/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c @@ -189,7 +189,7 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst, static void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst, struct ba_record *pBA) { - struct sk_buff *skb = NULL; + struct sk_buff *skb; skb = rtllib_ADDBA(ieee, dst, pBA, 0, ACT_ADDBAREQ); @@ -204,7 +204,7 @@ static void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst, static void rtllib_send_ADDBARsp(struct rtllib_device *ieee, u8 *dst, struct ba_record *pBA, u16 StatusCode) { - struct sk_buff *skb = NULL; + struct sk_buff *skb; skb = rtllib_ADDBA(ieee, dst, pBA, StatusCode, ACT_ADDBARSP); if (skb) @@ -217,7 +217,7 @@ static void rtllib_send_DELBA(struct rtllib_device *ieee, u8 *dst, struct ba_record *pBA, enum tr_select TxRxSelect, u16 ReasonCode) { - struct sk_buff *skb = NULL; + struct sk_buff *skb; skb = rtllib_DELBA(ieee, dst, pBA, TxRxSelect, ReasonCode); if (skb) diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 37343ec3b484..af64bd3b1c53 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -905,7 +905,7 @@ static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee, { struct rtllib_hdr_4addr *hdr = (struct rtllib_hdr_4addr *)skb->data; u16 fc = le16_to_cpu(hdr->frame_ctl); - size_t hdrlen = 0; + size_t hdrlen; hdrlen = rtllib_get_hdrlen(fc); if (HTCCheck(ieee, skb->data)) { diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 19c3bffef73c..25b5b5e31612 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -776,7 +776,7 @@ inline struct sk_buff *rtllib_authentication_req(struct rtllib_network *beacon, { struct sk_buff *skb; struct rtllib_authentication *auth; - int len = 0; + int len; len = sizeof(struct rtllib_authentication) + challengelen + ieee->tx_headroom + 4; diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c index 86f52ac7d33e..01a75bd21f86 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -243,7 +243,7 @@ int rtllib_wx_get_rate(struct rtllib_device *ieee, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - u32 tmp_rate = 0; + u32 tmp_rate; tmp_rate = TxCountToDataRate(ieee, ieee->softmac_stats.CurrentShowTxate); |