All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Vatika Harlalka <vatikaharlalka@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] Staging: rtl8188eu: Remove redundant if conditions
Date: Thu, 26 Feb 2015 12:52:05 -0800	[thread overview]
Message-ID: <20150226205205.GA30117@kroah.com> (raw)
In-Reply-To: <20150223150647.GA12403@gmail.com>

On Mon, Feb 23, 2015 at 08:36:47PM +0530, Vatika Harlalka wrote:
> The if branches are redundant as is2t is declared false
> and is not modified before the if statements.
> 
> Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
> ---
>  drivers/staging/rtl8188eu/hal/phy.c | 20 ++------------------
>  1 file changed, 2 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
> index e005150..e7ede44 100644
> --- a/drivers/staging/rtl8188eu/hal/phy.c
> +++ b/drivers/staging/rtl8188eu/hal/phy.c
> @@ -471,7 +471,8 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt)
>  	u32 i = 0, j = 0;
>  	bool is2t = false;

Can't you also just remove this variable?  That way you will notice that
you can get rid of one more chunk of if() in the function.

thanks,

greg k-h


  parent reply	other threads:[~2015-02-26 20:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 15:06 [PATCH] Staging: rtl8188eu: Remove redundant if conditions Vatika Harlalka
2015-02-23 19:25 ` [Outreachy kernel] " Jes Sorensen
2015-02-26 20:52 ` Greg KH [this message]
2015-02-27  6:05   ` Vatika Harlalka

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=20150226205205.GA30117@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --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.