Re: [PATCH 05/10] staging: rtl8188eu: Simplify led blinking strategy code.

From: Dan Carpenter
Date: Tue Apr 22 2014 - 06:21:37 EST


Minor white space complaints.

On Sun, Apr 20, 2014 at 02:17:13PM +0530, navin patidar wrote:
> @@ -1334,7 +316,7 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
> else
> pLed->BlinkingLedState = RTW_LED_ON;
> _set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA);
> - }
> + }
> break;
> case LED_CTL_TX:
> case LED_CTL_RX:
> @@ -1345,6 +327,10 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct

A stray space character was accidentally added here. You can fix minor
things like that in a later patch.

> _cancel_timer_ex(&(pLed->BlinkTimer));
> pLed->bLedNoLinkBlinkInProgress = false;
> }
> + if (pLed->bLedLinkBlinkInProgress) {
> + _cancel_timer_ex(&(pLed->BlinkTimer));
> + pLed->bLedLinkBlinkInProgress = false;
> + }
> pLed->bLedBlinkInProgress = true;
> pLed->CurrLedState = LED_BLINK_TXRX;
> pLed->BlinkTimes = 2;
> @@ -1357,22 +343,15 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
> break;
> case LED_CTL_START_WPS: /* wait until xinpin finish */
> case LED_CTL_START_WPS_BOTTON:
> - if (pLed1->bLedWPSBlinkInProgress) {
> - pLed1->bLedWPSBlinkInProgress = false;
> - _cancel_timer_ex(&(pLed1->BlinkTimer));
> -
> - pLed1->BlinkingLedState = RTW_LED_OFF;
> - pLed1->CurrLedState = RTW_LED_OFF;
> -
> - if (pLed1->bLedOn)
> - _set_timer(&(pLed->BlinkTimer), 0);
> - }
> -
> - if (!pLed->bLedWPSBlinkInProgress) {
> + if (!pLed->bLedWPSBlinkInProgress) {

And another here.

> if (pLed->bLedNoLinkBlinkInProgress) {
> _cancel_timer_ex(&(pLed->BlinkTimer));
> pLed->bLedNoLinkBlinkInProgress = false;
> }
> + if (pLed->bLedLinkBlinkInProgress) {
> + _cancel_timer_ex(&(pLed->BlinkTimer));
> + pLed->bLedLinkBlinkInProgress = false;
> + }
> if (pLed->bLedBlinkInProgress) {
> _cancel_timer_ex(&(pLed->BlinkTimer));
> pLed->bLedBlinkInProgress = false;
> @@ -1383,56 +362,44 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
> }
> pLed->bLedWPSBlinkInProgress = true;
> pLed->CurrLedState = LED_BLINK_WPS;
> - if (pLed->bLedOn) {
> + if (pLed->bLedOn)
> pLed->BlinkingLedState = RTW_LED_OFF;
> - _set_timer(&(pLed->BlinkTimer), LED_BLINK_SLOWLY_INTERVAL);
> - } else {
> + else
> pLed->BlinkingLedState = RTW_LED_ON;
> - _set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL);
> - }
> - }
> + _set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA);
> + }
> break;
> - case LED_CTL_STOP_WPS: /* WPS connect success */
> - if (pLed->bLedWPSBlinkInProgress) {
> + case LED_CTL_STOP_WPS:
> + if (pLed->bLedNoLinkBlinkInProgress) {
> _cancel_timer_ex(&(pLed->BlinkTimer));
> - pLed->bLedWPSBlinkInProgress = false;
> + pLed->bLedNoLinkBlinkInProgress = false;
> }
> -
> - pLed->bLedNoLinkBlinkInProgress = true;
> - pLed->CurrLedState = LED_BLINK_SLOWLY;
> - if (pLed->bLedOn)
> - pLed->BlinkingLedState = RTW_LED_OFF;
> - else
> - pLed->BlinkingLedState = RTW_LED_ON;
> - _set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA);
> -
> - break;
> - case LED_CTL_STOP_WPS_FAIL: /* WPS authentication fail */
> - if (pLed->bLedWPSBlinkInProgress) {
> + if (pLed->bLedLinkBlinkInProgress) {
> _cancel_timer_ex(&(pLed->BlinkTimer));
> - pLed->bLedWPSBlinkInProgress = false;
> + pLed->bLedLinkBlinkInProgress = false;

Another here.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/