diff options
author | Arushi Singhal <arushisinghal19971997@gmail.com> | 2018-03-03 11:02:36 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-06 04:03:44 -0800 |
commit | 500320b7332317e7cdb35d65e50e6d13807bce4f (patch) | |
tree | a9b594e2dc340b0a901902572743cf03c59c468f /drivers/staging/rtl8712 | |
parent | a51935a5b9ee8c265c95ea02bb2c9e7e5d103d0a (diff) | |
download | linux-500320b7332317e7cdb35d65e50e6d13807bce4f.tar.bz2 |
staging: rtl8712: remove unnecessary parentheses
Remove unnecessary parentheses around variables to conform to the Linux
kernel coding style. Issue found using checkpatch.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712')
-rw-r--r-- | drivers/staging/rtl8712/recv_linux.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl8712_cmd.c | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl8712_led.c | 70 |
3 files changed, 41 insertions, 41 deletions
diff --git a/drivers/staging/rtl8712/recv_linux.c b/drivers/staging/rtl8712/recv_linux.c index 986a55bb9877..8cf4286f6318 100644 --- a/drivers/staging/rtl8712/recv_linux.c +++ b/drivers/staging/rtl8712/recv_linux.c @@ -111,8 +111,8 @@ void r8712_recv_indicatepkt(struct _adapter *padapter, _pkt *skb; struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib; - precvpriv = &(padapter->recvpriv); - pfree_recv_queue = &(precvpriv->free_recv_queue); + precvpriv = &padapter->recvpriv; + pfree_recv_queue = &precvpriv->free_recv_queue; skb = precv_frame->u.hdr.pkt; if (!skb) goto _recv_indicatepkt_drop; diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c index 9c8e0c50a804..b1dfe9f46619 100644 --- a/drivers/staging/rtl8712/rtl8712_cmd.c +++ b/drivers/staging/rtl8712/rtl8712_cmd.c @@ -320,7 +320,7 @@ int r8712_cmd_thread(void *context) struct tx_desc *pdesc; void (*pcmd_callback)(struct _adapter *dev, struct cmd_obj *pcmd); struct _adapter *padapter = context; - struct cmd_priv *pcmdpriv = &(padapter->cmdpriv); + struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct completion *cmd_queue_comp = &pcmdpriv->cmd_queue_comp; struct mutex *pwctrl_lock = &padapter->pwrctrlpriv.mutex_lock; @@ -334,7 +334,7 @@ int r8712_cmd_thread(void *context) if (r8712_register_cmd_alive(padapter) != _SUCCESS) continue; _next: - pcmd = r8712_dequeue_cmd(&(pcmdpriv->cmd_queue)); + pcmd = r8712_dequeue_cmd(&pcmdpriv->cmd_queue); if (!(pcmd)) { r8712_unregister_cmd_alive(padapter); continue; @@ -419,7 +419,7 @@ _next: } /* free all cmd_obj resources */ do { - pcmd = r8712_dequeue_cmd(&(pcmdpriv->cmd_queue)); + pcmd = r8712_dequeue_cmd(&pcmdpriv->cmd_queue); if (!pcmd) break; r8712_free_cmd_obj(pcmd); @@ -433,7 +433,7 @@ void r8712_event_handle(struct _adapter *padapter, __le32 *peventbuf) u8 evt_code, evt_seq; u16 evt_sz; void (*event_callback)(struct _adapter *dev, u8 *pbuf); - struct evt_priv *pevt_priv = &(padapter->evtpriv); + struct evt_priv *pevt_priv = &padapter->evtpriv; if (!peventbuf) goto _abort_event_; diff --git a/drivers/staging/rtl8712/rtl8712_led.c b/drivers/staging/rtl8712/rtl8712_led.c index 455fba721135..e9077347837e 100644 --- a/drivers/staging/rtl8712/rtl8712_led.c +++ b/drivers/staging/rtl8712/rtl8712_led.c @@ -181,11 +181,11 @@ static void SwLedOff(struct _adapter *padapter, struct LED_871x *pLed) */ void r8712_InitSwLeds(struct _adapter *padapter) { - struct led_priv *pledpriv = &(padapter->ledpriv); + struct led_priv *pledpriv = &padapter->ledpriv; pledpriv->LedControlHandler = LedControl871x; - InitLed871x(padapter, &(pledpriv->SwLed0), LED_PIN_LED0); - InitLed871x(padapter, &(pledpriv->SwLed1), LED_PIN_LED1); + InitLed871x(padapter, &pledpriv->SwLed0, LED_PIN_LED0); + InitLed871x(padapter, &pledpriv->SwLed1, LED_PIN_LED1); } /* Description: @@ -193,10 +193,10 @@ void r8712_InitSwLeds(struct _adapter *padapter) */ void r8712_DeInitSwLeds(struct _adapter *padapter) { - struct led_priv *ledpriv = &(padapter->ledpriv); + struct led_priv *ledpriv = &padapter->ledpriv; - DeInitLed871x(&(ledpriv->SwLed0)); - DeInitLed871x(&(ledpriv->SwLed1)); + DeInitLed871x(&ledpriv->SwLed0); + DeInitLed871x(&ledpriv->SwLed1); } /* Description: @@ -206,7 +206,7 @@ void r8712_DeInitSwLeds(struct _adapter *padapter) static void SwLedBlink(struct LED_871x *pLed) { struct _adapter *padapter = pLed->padapter; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ @@ -281,14 +281,14 @@ static void SwLedBlink(struct LED_871x *pLed) static void SwLedBlink1(struct LED_871x *pLed) { struct _adapter *padapter = pLed->padapter; - struct led_priv *ledpriv = &(padapter->ledpriv); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct eeprom_priv *peeprompriv = &(padapter->eeprompriv); - struct LED_871x *pLed1 = &(ledpriv->SwLed1); + struct led_priv *ledpriv = &padapter->ledpriv; + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct eeprom_priv *peeprompriv = &padapter->eeprompriv; + struct LED_871x *pLed1 = &ledpriv->SwLed1; u8 bStopBlinking = false; if (peeprompriv->CustomerID == RT_CID_819x_CAMEO) - pLed = &(ledpriv->SwLed1); + pLed = &ledpriv->SwLed1; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == LED_STATE_ON) SwLedOn(padapter, pLed); @@ -499,7 +499,7 @@ static void SwLedBlink2(struct LED_871x *pLed) static void SwLedBlink3(struct LED_871x *pLed) { struct _adapter *padapter = pLed->padapter; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ @@ -593,8 +593,8 @@ static void SwLedBlink3(struct LED_871x *pLed) static void SwLedBlink4(struct LED_871x *pLed) { struct _adapter *padapter = pLed->padapter; - struct led_priv *ledpriv = &(padapter->ledpriv); - struct LED_871x *pLed1 = &(ledpriv->SwLed1); + struct led_priv *ledpriv = &padapter->ledpriv; + struct LED_871x *pLed1 = &ledpriv->SwLed1; u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ @@ -844,7 +844,7 @@ static void BlinkWorkItemCallback(struct work_struct *work) { struct LED_871x *pLed = container_of(work, struct LED_871x, BlinkWorkItem); - struct led_priv *ledpriv = &(pLed->padapter->ledpriv); + struct led_priv *ledpriv = &pLed->padapter->ledpriv; switch (ledpriv->LedStrategy) { case SW_LED_MODE0: @@ -886,13 +886,13 @@ static void BlinkWorkItemCallback(struct work_struct *work) static void SwLedControlMode1(struct _adapter *padapter, enum LED_CTL_MODE LedAction) { - struct led_priv *ledpriv = &(padapter->ledpriv); - struct LED_871x *pLed = &(ledpriv->SwLed0); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct sitesurvey_ctrl *psitesurveyctrl = &(pmlmepriv->sitesurveyctrl); + struct led_priv *ledpriv = &padapter->ledpriv; + struct LED_871x *pLed = &ledpriv->SwLed0; + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct sitesurvey_ctrl *psitesurveyctrl = &pmlmepriv->sitesurveyctrl; if (padapter->eeprompriv.CustomerID == RT_CID_819x_CAMEO) - pLed = &(ledpriv->SwLed1); + pLed = &ledpriv->SwLed1; switch (LedAction) { case LED_CTL_START_TO_LINK: case LED_CTL_NO_LINK: @@ -1106,9 +1106,9 @@ static void SwLedControlMode1(struct _adapter *padapter, static void SwLedControlMode2(struct _adapter *padapter, enum LED_CTL_MODE LedAction) { - struct led_priv *ledpriv = &(padapter->ledpriv); + struct led_priv *ledpriv = &padapter->ledpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct LED_871x *pLed = &(ledpriv->SwLed0); + struct LED_871x *pLed = &ledpriv->SwLed0; switch (LedAction) { case LED_CTL_SITE_SURVEY: @@ -1239,9 +1239,9 @@ static void SwLedControlMode2(struct _adapter *padapter, static void SwLedControlMode3(struct _adapter *padapter, enum LED_CTL_MODE LedAction) { - struct led_priv *ledpriv = &(padapter->ledpriv); + struct led_priv *ledpriv = &padapter->ledpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct LED_871x *pLed = &(ledpriv->SwLed0); + struct LED_871x *pLed = &ledpriv->SwLed0; switch (LedAction) { case LED_CTL_SITE_SURVEY: @@ -1383,10 +1383,10 @@ static void SwLedControlMode3(struct _adapter *padapter, static void SwLedControlMode4(struct _adapter *padapter, enum LED_CTL_MODE LedAction) { - struct led_priv *ledpriv = &(padapter->ledpriv); + struct led_priv *ledpriv = &padapter->ledpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct LED_871x *pLed = &(ledpriv->SwLed0); - struct LED_871x *pLed1 = &(ledpriv->SwLed1); + struct LED_871x *pLed = &ledpriv->SwLed0; + struct LED_871x *pLed1 = &ledpriv->SwLed1; switch (LedAction) { case LED_CTL_START_TO_LINK: @@ -1650,12 +1650,12 @@ static void SwLedControlMode4(struct _adapter *padapter, static void SwLedControlMode5(struct _adapter *padapter, enum LED_CTL_MODE LedAction) { - struct led_priv *ledpriv = &(padapter->ledpriv); + struct led_priv *ledpriv = &padapter->ledpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct LED_871x *pLed = &(ledpriv->SwLed0); + struct LED_871x *pLed = &ledpriv->SwLed0; if (padapter->eeprompriv.CustomerID == RT_CID_819x_CAMEO) - pLed = &(ledpriv->SwLed1); + pLed = &ledpriv->SwLed1; switch (LedAction) { case LED_CTL_POWER_ON: @@ -1723,9 +1723,9 @@ static void SwLedControlMode5(struct _adapter *padapter, static void SwLedControlMode6(struct _adapter *padapter, enum LED_CTL_MODE LedAction) { - struct led_priv *ledpriv = &(padapter->ledpriv); + struct led_priv *ledpriv = &padapter->ledpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct LED_871x *pLed = &(ledpriv->SwLed0); + struct LED_871x *pLed = &ledpriv->SwLed0; switch (LedAction) { case LED_CTL_POWER_ON: @@ -1737,7 +1737,7 @@ static void SwLedControlMode6(struct _adapter *padapter, pLed->CurrLedState = LED_STATE_ON; pLed->BlinkingLedState = LED_STATE_ON; pLed->bLedBlinkInProgress = false; - mod_timer(&(pLed->BlinkTimer), jiffies + msecs_to_jiffies(0)); + mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); break; case LED_CTL_TX: case LED_CTL_RX: @@ -1807,7 +1807,7 @@ static void SwLedControlMode6(struct _adapter *padapter, */ void LedControl871x(struct _adapter *padapter, enum LED_CTL_MODE LedAction) { - struct led_priv *ledpriv = &(padapter->ledpriv); + struct led_priv *ledpriv = &padapter->ledpriv; if (!ledpriv->bRegUseLed) return; |