[PATCH] staging: rtl8723au: Fix open brace error.

Mihaela Gaman mp.gaman at gmail.com
Thu Oct 2 23:35:25 EEST 2014


This fixes the error:
        "that open brace { should be on the previous line".

Signed-off-by: Mihaela Gaman <mp.gaman at gmail.com>
---
 drivers/staging/rtl8723au/core/rtw_led.c | 108 ++++++++++---------------------
 1 file changed, 34 insertions(+), 74 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_led.c b/drivers/staging/rtl8723au/core/rtw_led.c
index 989cda2..616ada7 100644
--- a/drivers/staging/rtl8723au/core/rtw_led.c
+++ b/drivers/staging/rtl8723au/core/rtw_led.c
@@ -28,8 +28,7 @@ static void BlinkTimerCallback(unsigned long data)
 
 	/* DBG_8723A("%s\n", __func__); */
 
-	if ((padapter->bSurpriseRemoved == true) || (padapter->bDriverStopped == true))
-	{
+	if ((padapter->bSurpriseRemoved == true) || (padapter->bDriverStopped == true)) {
 		/* DBG_8723A("%s bSurpriseRemoved:%d, bDriverStopped:%d\n", __func__, padapter->bSurpriseRemoved, padapter->bDriverStopped); */
 		return;
 	}
@@ -422,34 +421,26 @@ static void SwLedBlink3(struct led_8723a *pLed)
 	u8 bStopBlinking = false;
 
 	/*  Change LED according to BlinkingLedState specified. */
-	if (pLed->BlinkingLedState == RTW_LED_ON)
-	{
+	if (pLed->BlinkingLedState == RTW_LED_ON) {
 		SwLedOn23a(padapter, pLed);
 		RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
-	}
-	else
-	{
+	} else {
 		if (pLed->CurrLedState != LED_BLINK_WPS_STOP)
 			SwLedOff23a(padapter, pLed);
 		RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
 	}
 
-	switch (pLed->CurrLedState)
-	{
+	switch (pLed->CurrLedState) {
 		case LED_BLINK_SCAN:
 			pLed->BlinkTimes--;
-			if (pLed->BlinkTimes == 0)
-			{
+			if (pLed->BlinkTimes == 0) {
 				bStopBlinking = true;
 			}
 
-			if (bStopBlinking)
-			{
-				if (padapter->pwrctrlpriv.rf_pwrstate != rf_on)
-				{
+			if (bStopBlinking) {
+				if (padapter->pwrctrlpriv.rf_pwrstate != rf_on) {
 					SwLedOff23a(padapter, pLed);
-				}
-				else if (check_fwstate(pmlmepriv, _FW_LINKED)) {
+				} else if (check_fwstate(pmlmepriv, _FW_LINKED)) {
 					pLed->CurrLedState = RTW_LED_ON;
 					pLed->BlinkingLedState = RTW_LED_ON;
 					if (!pLed->bLedOn)
@@ -465,15 +456,10 @@ static void SwLedBlink3(struct led_8723a *pLed)
 					RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
 				}
 				pLed->bLedScanBlinkInProgress = false;
-			}
-			else
-			{
-				if (padapter->pwrctrlpriv.rf_pwrstate != rf_on)
-				{
+			} else {
+				if (padapter->pwrctrlpriv.rf_pwrstate != rf_on) {
 					SwLedOff23a(padapter, pLed);
-				}
-				else
-				{
+				} else {
 					if (pLed->bLedOn)
 						pLed->BlinkingLedState = RTW_LED_OFF;
 					else
@@ -486,14 +472,11 @@ static void SwLedBlink3(struct led_8723a *pLed)
 
 		case LED_BLINK_TXRX:
 			pLed->BlinkTimes--;
-			if (pLed->BlinkTimes == 0)
-			{
+			if (pLed->BlinkTimes == 0) {
 				bStopBlinking = true;
 			}
-			if (bStopBlinking)
-			{
-				if (padapter->pwrctrlpriv.rf_pwrstate != rf_on)
-				{
+			if (bStopBlinking) {
+				if (padapter->pwrctrlpriv.rf_pwrstate != rf_on) {
 					SwLedOff23a(padapter, pLed);
 				} else if (check_fwstate(pmlmepriv,
 							 _FW_LINKED)) {
@@ -514,15 +497,10 @@ static void SwLedBlink3(struct led_8723a *pLed)
 					RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
 				}
 				pLed->bLedBlinkInProgress = false;
-			}
-			else
-			{
-				if (padapter->pwrctrlpriv.rf_pwrstate != rf_on)
-				{
+			} else {
+				if (padapter->pwrctrlpriv.rf_pwrstate != rf_on) {
 					SwLedOff23a(padapter, pLed);
-				}
-				else
-				{
+				} else {
 					if (pLed->bLedOn)
 						pLed->BlinkingLedState = RTW_LED_OFF;
 					else
@@ -543,8 +521,7 @@ static void SwLedBlink3(struct led_8723a *pLed)
 			break;
 
 		case LED_BLINK_WPS_STOP:	/* WPS success */
-			if (pLed->BlinkingLedState == RTW_LED_ON)
-			{
+			if (pLed->BlinkingLedState == RTW_LED_ON) {
 				pLed->BlinkingLedState = RTW_LED_OFF;
 				mod_timer(&pLed->BlinkTimer, jiffies +
 					  msecs_to_jiffies(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA));
@@ -553,14 +530,10 @@ static void SwLedBlink3(struct led_8723a *pLed)
 				bStopBlinking = true;
 			}
 
-			if (bStopBlinking)
-			{
-				if (padapter->pwrctrlpriv.rf_pwrstate != rf_on)
-				{
+			if (bStopBlinking) {
+				if (padapter->pwrctrlpriv.rf_pwrstate != rf_on) {
 					SwLedOff23a(padapter, pLed);
-				}
-				else
-				{
+				} else {
 					pLed->CurrLedState = RTW_LED_ON;
 					pLed->BlinkingLedState = RTW_LED_ON;
 					SwLedOn23a(padapter, pLed);
@@ -584,8 +557,7 @@ static void SwLedBlink4(struct led_8723a *pLed)
 	unsigned long delay = 0;
 
 	/*  Change LED according to BlinkingLedState specified. */
-	if (pLed->BlinkingLedState == RTW_LED_ON)
-	{
+	if (pLed->BlinkingLedState == RTW_LED_ON) {
 		SwLedOn23a(padapter, pLed);
 		RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
 	} else {
@@ -593,15 +565,13 @@ static void SwLedBlink4(struct led_8723a *pLed)
 		RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
 	}
 
-	if (!pLed1->bLedWPSBlinkInProgress && pLed1->BlinkingLedState == LED_UNKNOWN)
-	{
+	if (!pLed1->bLedWPSBlinkInProgress && pLed1->BlinkingLedState == LED_UNKNOWN) {
 		pLed1->BlinkingLedState = RTW_LED_OFF;
 		pLed1->CurrLedState = RTW_LED_OFF;
 		SwLedOff23a(padapter, pLed1);
 	}
 
-	switch (pLed->CurrLedState)
-	{
+	switch (pLed->CurrLedState) {
 		case LED_BLINK_SLOWLY:
 			if (pLed->bLedOn)
 				pLed->BlinkingLedState = RTW_LED_OFF;
@@ -750,8 +720,7 @@ static void SwLedBlink5(struct led_8723a *pLed)
 		RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
 	}
 
-	switch (pLed->CurrLedState)
-	{
+	switch (pLed->CurrLedState) {
 		case LED_BLINK_SCAN:
 			pLed->BlinkTimes--;
 			if (pLed->BlinkTimes == 0) {
@@ -853,8 +822,7 @@ SwLedControlMode1(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
 
 	long delay = -1;
 
-	switch (LedAction)
-	{
+	switch (LedAction) {
 		case LED_CTL_POWER_ON:
 		case LED_CTL_START_TO_LINK:
 		case LED_CTL_NO_LINK:
@@ -1183,8 +1151,7 @@ SwLedControlMode2(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
 		break;
 	case LED_CTL_START_TO_LINK:
 	case LED_CTL_NO_LINK:
-		if (!IS_LED_BLINKING(pLed))
-		{
+		if (!IS_LED_BLINKING(pLed)) {
 			pLed->CurrLedState = RTW_LED_OFF;
 			pLed->BlinkingLedState = RTW_LED_OFF;
 			delay = 0;
@@ -1228,8 +1195,7 @@ SwLedControlMode3(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
 	struct led_8723a *pLed = &ledpriv->SwLed0;
 	long delay = -1;
 
-	switch (LedAction)
-	{
+	switch (LedAction) {
 		case LED_CTL_SITE_SURVEY:
 			if (pmlmepriv->LinkDetectInfo.bBusyTraffic)
 				;
@@ -1343,8 +1309,7 @@ SwLedControlMode3(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
 
 		case LED_CTL_START_TO_LINK:
 		case LED_CTL_NO_LINK:
-			if (!IS_LED_BLINKING(pLed))
-			{
+			if (!IS_LED_BLINKING(pLed)) {
 				pLed->CurrLedState = RTW_LED_OFF;
 				pLed->BlinkingLedState = RTW_LED_OFF;
 				delay = 0;
@@ -1390,8 +1355,7 @@ SwLedControlMode4(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
 	struct led_8723a *pLed = &ledpriv->SwLed0;
 	struct led_8723a *pLed1 = &ledpriv->SwLed1;
 
-	switch (LedAction)
-	{
+	switch (LedAction) {
 		case LED_CTL_START_TO_LINK:
 			if (pLed1->bLedWPSBlinkInProgress) {
 				pLed1->bLedWPSBlinkInProgress = false;
@@ -1548,8 +1512,7 @@ SwLedControlMode4(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
 				}
 				pLed->bLedWPSBlinkInProgress = true;
 				pLed->CurrLedState = LED_BLINK_WPS;
-				if (pLed->bLedOn)
-				{
+				if (pLed->bLedOn) {
 					pLed->BlinkingLedState = RTW_LED_OFF;
 					mod_timer(&pLed->BlinkTimer, jiffies +
 						  msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL));
@@ -1695,8 +1658,7 @@ SwLedControlMode5(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
 	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 	struct led_8723a *pLed = &ledpriv->SwLed0;
 
-	switch (LedAction)
-	{
+	switch (LedAction) {
 		case LED_CTL_POWER_ON:
 		case LED_CTL_NO_LINK:
 		case LED_CTL_LINK:	/* solid blue */
@@ -1710,10 +1672,8 @@ SwLedControlMode5(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
 			if (pmlmepriv->LinkDetectInfo.bBusyTraffic &&
 			    check_fwstate(pmlmepriv, _FW_LINKED))
 				;
-			else if (pLed->bLedScanBlinkInProgress == false)
-			{
-				if (pLed->bLedBlinkInProgress == true)
-				{
+			else if (pLed->bLedScanBlinkInProgress == false) {
+				if (pLed->bLedBlinkInProgress == true) {
 					del_timer_sync(&pLed->BlinkTimer);
 					pLed->bLedBlinkInProgress = false;
 				}
-- 
1.9.1



More information about the firefly mailing list