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] [day] [month] [year] [list]
Date:   Fri, 7 Sep 2018 12:57:01 +0200
From:   Michael Straube <straube.linux@...il.com>
To:     Joe Perches <joe@...ches.com>,
        Dan Carpenter <dan.carpenter@...cle.com>
Cc:     gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] staging: rtl8188eu: remove empty if statement in
 rtw_led.c

On 9/6/18 12:41 PM, Joe Perches wrote:
> On Thu, 2018-09-06 at 13:32 +0300, Dan Carpenter wrote:
>> Thanks.
>>
>> Reviewed-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> Trivial, but these case statement blocks should prefer
> unindented blocks instead of reformatting the test.
> 
> Perhaps similar to the below for each of the cases:

That sounds good to me. I will send a patch with Joe's
suggestions, thanks. It will also solve some lines too
long warnings. :)

So, please do not merge this series.

> ---
>   drivers/staging/rtl8188eu/core/rtw_led.c | 53 ++++++++++++++++----------------
>   1 file changed, 27 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/core/rtw_led.c b/drivers/staging/rtl8188eu/core/rtw_led.c
> index cbef871a7679..d9c19c1cda16 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_led.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_led.c
> @@ -290,33 +290,34 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
>   		}
>   		break;
>   	case LED_CTL_SITE_SURVEY:
> -		if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED))) {
> -			;
> -		} else if (!pLed->bLedScanBlinkInProgress) {
> -			if (IS_LED_WPS_BLINKING(pLed))
> -				return;
> -			if (pLed->bLedNoLinkBlinkInProgress) {
> -				del_timer_sync(&pLed->BlinkTimer);
> -				pLed->bLedNoLinkBlinkInProgress = false;
> -			}
> -			if (pLed->bLedLinkBlinkInProgress) {
> -				del_timer_sync(&pLed->BlinkTimer);
> -				 pLed->bLedLinkBlinkInProgress = false;
> -			}
> -			if (pLed->bLedBlinkInProgress) {
> -				del_timer_sync(&pLed->BlinkTimer);
> -				pLed->bLedBlinkInProgress = false;
> -			}
> -			pLed->bLedScanBlinkInProgress = true;
> -			pLed->CurrLedState = LED_BLINK_SCAN;
> -			pLed->BlinkTimes = 24;
> -			if (pLed->bLedOn)
> -				pLed->BlinkingLedState = RTW_LED_OFF;
> -			else
> -				pLed->BlinkingLedState = RTW_LED_ON;
> -			mod_timer(&pLed->BlinkTimer, jiffies +
> -				  msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
> +		if (pmlmepriv->LinkDetectInfo.bBusyTraffic &&
> +		    check_fwstate(pmlmepriv, _FW_LINKED))
> +			break;
> +		if (pLed->bLedScanBlinkInProgress)
> +			break;
> +		if (IS_LED_WPS_BLINKING(pLed))
> +			return;
> +		if (pLed->bLedNoLinkBlinkInProgress) {
> +			del_timer_sync(&pLed->BlinkTimer);
> +			pLed->bLedNoLinkBlinkInProgress = false;
> +		}
> +		if (pLed->bLedLinkBlinkInProgress) {
> +			del_timer_sync(&pLed->BlinkTimer);
> +			pLed->bLedLinkBlinkInProgress = false;
> +		}
> +		if (pLed->bLedBlinkInProgress) {
> +			del_timer_sync(&pLed->BlinkTimer);
> +			pLed->bLedBlinkInProgress = false;
>   		}
> +		pLed->bLedScanBlinkInProgress = true;
> +		pLed->CurrLedState = LED_BLINK_SCAN;
> +		pLed->BlinkTimes = 24;
> +		if (pLed->bLedOn)
> +			pLed->BlinkingLedState = RTW_LED_OFF;
> +		else
> +			pLed->BlinkingLedState = RTW_LED_ON;
> +		mod_timer(&pLed->BlinkTimer, jiffies +
> +			  msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
>   		break;
>   	case LED_CTL_TX:
>   	case LED_CTL_RX:
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ