lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140422102105.GH26890@mwanda>
Date:	Tue, 22 Apr 2014 13:21:05 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	navin patidar <navin.patidar@...il.com>
Cc:	gregkh@...uxfoundation.org, Larry.Finger@...inger.net,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/10] staging: rtl8188eu: Simplify led blinking strategy
 code.

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ