All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <jes.sorensen@gmail.com>
To: Vatika Harlalka <vatikaharlalka@gmail.com>,
	 outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH v3] Remove redundant if condition
Date: Mon, 23 Feb 2015 14:34:51 -0500	[thread overview]
Message-ID: <54EB80DB.3050004@gmail.com> (raw)
In-Reply-To: <20150223114312.GA7095@gmail.com>

On 02/23/15 06:43, Vatika Harlalka wrote:
> Remove redundant if condition as !result is always false.
> 
> Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
> ---
> Changes in v3: Removed unneeded newline after if condition to
> 		follow kernel coding conventions.
> Changes in v2: Removed {} around the outer if condition as
>                 it has single statement.
> 
>  drivers/staging/rtl8188eu/hal/phy.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)

The patch is good, the commit message is good, however the subject needs
to include "staging: rtl8188eu: ....". You need to repost a v4 to cover
this.

Cheers,
Jes

> diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
> index 3950cb3..c20881d 100644
> --- a/drivers/staging/rtl8188eu/hal/phy.c
> +++ b/drivers/staging/rtl8188eu/hal/phy.c
> @@ -359,7 +359,6 @@ void phy_sw_chnl(struct adapter *adapt, u8 channel)
>  {
>  	struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt);
>  	u8 tmpchannel = hal_data->CurrentChannel;
> -	bool  result = true;
>  
>  	if (hal_data->rf_chip == RF_PSEUDO_11N)
>  		return;
> @@ -369,15 +368,10 @@ void phy_sw_chnl(struct adapter *adapt, u8 channel)
>  
>  	hal_data->CurrentChannel = channel;
>  
> -	if ((!adapt->bDriverStopped) && (!adapt->bSurpriseRemoved)) {
> +	if ((!adapt->bDriverStopped) && (!adapt->bSurpriseRemoved))
>  		phy_sw_chnl_callback(adapt, channel);
> -
> -		if (!result)
> -			hal_data->CurrentChannel = tmpchannel;
> -
> -	} else {
> +	else
>  		hal_data->CurrentChannel = tmpchannel;
> -	}
>  }
>  
>  #define ODM_TXPWRTRACK_MAX_IDX_88E  6
> 



      reply	other threads:[~2015-02-23 19:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 11:43 [PATCH v3] Remove redundant if condition Vatika Harlalka
2015-02-23 19:34 ` Jes Sorensen [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=54EB80DB.3050004@gmail.com \
    --to=jes.sorensen@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=vatikaharlalka@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.