forked from Minki/linux
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>
This commit is contained in:
parent
a4eed41f96
commit
7949be663f
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user