Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751296AbcCKSTg (ORCPT ); Fri, 11 Mar 2016 13:19:36 -0500 Received: from mail-yw0-f179.google.com ([209.85.161.179]:34073 "EHLO mail-yw0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750944AbcCKSTd (ORCPT ); Fri, 11 Mar 2016 13:19:33 -0500 Subject: Re: [PATCH] staging: rtl8712: added few code enhancements in rtl8712_led.c To: Claudiu Beznea , florian.c.schilhabel@googlemail.com, gregkh@linuxfoundation.org, luisbg@osg.samsung.com, sudipm.mukherjee@gmail.com, vthakkar1994@gmail.com References: <1457560458-20704-1-git-send-email-claudiu.beznea@gmail.com> Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org From: Larry Finger Message-ID: <56E30C32.6070102@lwfinger.net> Date: Fri, 11 Mar 2016 12:19:30 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1457560458-20704-1-git-send-email-claudiu.beznea@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1351 Lines: 33 On 03/09/2016 03:54 PM, Claudiu Beznea wrote: > This patch tries to improve a part of the code from > rtl8712_led.c by removing duplicates condition checks. > > Signed-off-by: Claudiu Beznea > --- > drivers/staging/rtl8712/rtl8712_led.c | 31 +++++++++++++++---------------- > 1 file changed, 15 insertions(+), 16 deletions(-) > > diff --git a/drivers/staging/rtl8712/rtl8712_led.c b/drivers/staging/rtl8712/rtl8712_led.c > index 9055827..aea6f2d 100644 > --- a/drivers/staging/rtl8712/rtl8712_led.c > +++ b/drivers/staging/rtl8712/rtl8712_led.c > @@ -221,11 +221,9 @@ static void SwLedBlink(struct LED_871x *pLed) > break; > case LED_BLINK_StartToBlink: > if (check_fwstate(pmlmepriv, _FW_LINKED) && > - (pmlmepriv->fw_state & WIFI_STATION_STATE)) > - bStopBlinking = true; > - if (check_fwstate(pmlmepriv, _FW_LINKED) && > - ((pmlmepriv->fw_state & WIFI_ADHOC_STATE) || > - (pmlmepriv->fw_state & WIFI_ADHOC_MASTER_STATE))) > + ((pmlmepriv->fw_state & WIFI_STATION_STATE) || > + (pmlmepriv->fw_state & WIFI_ADHOC_STATE) || > + (pmlmepriv->fw_state & WIFI_ADHOC_MASTER_STATE))) The above hunk messes up the alignment of the if statement. Observe the alignment of the stuff you are removing. It is correct. Other than the alignment above, the rest of the patch is correct. Larry