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 1/4] Staging: rtl8188eu: Remove redundant if condition clause
Date: Mon, 02 Mar 2015 12:23:31 -0500	[thread overview]
Message-ID: <54F49C93.9080208@gmail.com> (raw)
In-Reply-To: <78424de094126cf4c12d3fbc98ccbc6de07f52a3.1425276736.git.vatikaharlalka@gmail.com>

On 03/02/15 01:22, Vatika Harlalka wrote:
> Clause removed as !sim_bitmap is always true.
> 
> Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
> ---
>  drivers/staging/rtl8188eu/hal/phy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
> index 2af3013..2bbdcca 100644
> --- a/drivers/staging/rtl8188eu/hal/phy.c
> +++ b/drivers/staging/rtl8188eu/hal/phy.c
> @@ -1025,7 +1025,7 @@ static bool simularity_compare(struct adapter *adapt, s32 resulta[][8],
>  		diff = (tmp1 > tmp2) ? (tmp1 - tmp2) : (tmp2 - tmp1);
>  
>  		if (diff > MAX_TOLERANCE) {
> -			if ((i == 2 || i == 6) && !sim_bitmap) {
> +			if (i == 2 || i == 6) {
>  				if (resulta[c1][i] + resulta[c1][i+1] == 0)
>  					final_candidate[(i/4)] = c2;
>  				else if (resulta[c2][i] + resulta[c2][i+1] == 0)
> 

How do you come to the conclusion that !sim_bitmap is always true here?
This is inside a for() loop, and once i > 0, sim_bitmap could be != 0.

NACK

Cheers,
Jes



  reply	other threads:[~2015-03-02 17:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02  6:22 [PATCH 0/4] Staging: rtl8188eu: Cleanup code to increase compactness Vatika Harlalka
2015-03-02  6:22 ` [PATCH 1/4] Staging: rtl8188eu: Remove redundant if condition clause Vatika Harlalka
2015-03-02 17:23   ` Jes Sorensen [this message]
2015-03-02  6:22 ` [PATCH 2/4] Staging: rtl8188eu: Remove unnecessary if condition Vatika Harlalka
2015-03-02  6:22 ` [PATCH 3/4] Staging: rtl8188eu: Remove dead code Vatika Harlalka
2015-03-02  6:22 ` [PATCH 4/4] Staging: rtl8188eu: Change return type of function to void 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=54F49C93.9080208@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.