2019-06-07 05:55:21

by Nishka Dasgupta

[permalink] [raw]
Subject: [PATCH 1/3] staging: rtl8712: xmit_linux.c: Remove leading p from variable names

Remove leading p from the names of the following pointer variables:
- padapter
- pxmitpriv
- pnetdev
- pxmitframe.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <[email protected]>
---
drivers/staging/rtl8712/xmit_linux.c | 50 ++++++++++++++--------------
1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c
index 8bcb0775411f..223a4eba4bf4 100644
--- a/drivers/staging/rtl8712/xmit_linux.c
+++ b/drivers/staging/rtl8712/xmit_linux.c
@@ -93,22 +93,22 @@ void r8712_set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)

void r8712_SetFilter(struct work_struct *work)
{
- struct _adapter *padapter = container_of(work, struct _adapter,
+ struct _adapter *adapter = container_of(work, struct _adapter,
wkFilterRxFF0);
u8 oldvalue = 0x00, newvalue = 0x00;
unsigned long irqL;

- oldvalue = r8712_read8(padapter, 0x117);
+ oldvalue = r8712_read8(adapter, 0x117);
newvalue = oldvalue & 0xfe;
- r8712_write8(padapter, 0x117, newvalue);
+ r8712_write8(adapter, 0x117, newvalue);

- spin_lock_irqsave(&padapter->lockRxFF0Filter, irqL);
- padapter->blnEnableRxFF0Filter = 1;
- spin_unlock_irqrestore(&padapter->lockRxFF0Filter, irqL);
+ spin_lock_irqsave(&adapter->lockRxFF0Filter, irqL);
+ adapter->blnEnableRxFF0Filter = 1;
+ spin_unlock_irqrestore(&adapter->lockRxFF0Filter, irqL);
do {
msleep(100);
- } while (padapter->blnEnableRxFF0Filter == 1);
- r8712_write8(padapter, 0x117, oldvalue);
+ } while (adapter->blnEnableRxFF0Filter == 1);
+ r8712_write8(adapter, 0x117, oldvalue);
}

int r8712_xmit_resource_alloc(struct _adapter *padapter,
@@ -147,36 +147,36 @@ void r8712_xmit_complete(struct _adapter *padapter, struct xmit_frame *pxframe)
pxframe->pkt = NULL;
}

-int r8712_xmit_entry(_pkt *pkt, struct net_device *pnetdev)
+int r8712_xmit_entry(_pkt *pkt, struct net_device *netdev)
{
- struct xmit_frame *pxmitframe = NULL;
- struct _adapter *padapter = netdev_priv(pnetdev);
- struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
+ struct xmit_frame *xmitframe = NULL;
+ struct _adapter *adapter = netdev_priv(netdev);
+ struct xmit_priv *xmitpriv = &(adapter->xmitpriv);

- if (!r8712_if_up(padapter))
+ if (!r8712_if_up(adapter))
goto _xmit_entry_drop;

- pxmitframe = r8712_alloc_xmitframe(pxmitpriv);
- if (!pxmitframe)
+ xmitframe = r8712_alloc_xmitframe(xmitpriv);
+ if (!xmitframe)
goto _xmit_entry_drop;

- if ((!r8712_update_attrib(padapter, pkt, &pxmitframe->attrib)))
+ if ((!r8712_update_attrib(adapter, pkt, &xmitframe->attrib)))
goto _xmit_entry_drop;

- padapter->ledpriv.LedControlHandler(padapter, LED_CTL_TX);
- pxmitframe->pkt = pkt;
- if (r8712_pre_xmit(padapter, pxmitframe)) {
+ adapter->ledpriv.LedControlHandler(adapter, LED_CTL_TX);
+ xmitframe->pkt = pkt;
+ if (r8712_pre_xmit(adapter, xmitframe)) {
/*dump xmitframe directly or drop xframe*/
dev_kfree_skb_any(pkt);
- pxmitframe->pkt = NULL;
+ xmitframe->pkt = NULL;
}
- pxmitpriv->tx_pkts++;
- pxmitpriv->tx_bytes += pxmitframe->attrib.last_txcmdsz;
+ xmitpriv->tx_pkts++;
+ xmitpriv->tx_bytes += xmitframe->attrib.last_txcmdsz;
return 0;
_xmit_entry_drop:
- if (pxmitframe)
- r8712_free_xmitframe(pxmitpriv, pxmitframe);
- pxmitpriv->tx_drop++;
+ if (xmitframe)
+ r8712_free_xmitframe(xmitpriv, xmitframe);
+ xmitpriv->tx_drop++;
dev_kfree_skb_any(pkt);
return 0;
}
--
2.19.1