mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: Joe Perches <joe@perches.com>, Dan Carpenter <dan.carpenter@oracle.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] staging: rtl8188eu: remove empty if statement in rtw_led.c
Date: Fri, 7 Sep 2018 12:57:01 +0200	[thread overview]
Message-ID: <bc3c8ce3-482e-d326-9d1b-d5534dccd111@gmail.com> (raw)
In-Reply-To: <f0dd985b91258f1990e77a2731a59e007dd8a0e0.camel@perches.com>

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@oracle.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:
> 

      reply	other threads:[~2018-09-07 10:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05 18:44 Michael Straube
2018-09-05 18:44 ` [PATCH v2 2/2] staging: rtl8188eu: remove unnecessary parentheses " Michael Straube
2018-09-06 10:32 ` [PATCH v2 1/2] staging: rtl8188eu: remove empty if statement " Dan Carpenter
2018-09-06 10:41   ` Joe Perches
2018-09-07 10:57     ` Michael Straube [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc3c8ce3-482e-d326-9d1b-d5534dccd111@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome