All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] staging: rtl8192e: Remove multiple assignments
Date: Fri, 11 Mar 2016 09:21:29 -0800	[thread overview]
Message-ID: <20160311172129.GA7885@kroah.com> (raw)
In-Reply-To: <20160305210223.GA22841@Karyakshetra>

On Sun, Mar 06, 2016 at 02:32:23AM +0530, Bhaktipriya Shridhar wrote:
> This patch removes multiple assignments by factorizing them.
> 
> This was done with Coccinelle.
> 
> @ identifier i1,i2; constant c; @@
> - i1=i2=c;
> + i1=c;
> + i2=c;
> 
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
> ---
>  drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> index b6b714d..6834652 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> @@ -887,8 +887,10 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
>  			tmpCCK40Mindex = CCK_Table_length-1;
>  	} else {
>  		tmpval = ((u8)tmpRegA - priv->ThermalMeter[0]);
> -		if (tmpval >= 6)
> -			tmpOFDMindex = tmpCCK20Mindex = 0;
> +		if (tmpval >= 6) {
> +			tmpOFDMindex = 0;
> +			tmpCCK20Mindex = 0;
> +		}
>  		else

Your brace placement is wrong here :(



  reply	other threads:[~2016-03-11 17:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-05 21:02 [PATCH] staging: rtl8192e: Remove multiple assignments Bhaktipriya Shridhar
2016-03-11 17:21 ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-03-11 14:19 Gargi Sharma
2017-03-11 14:51 ` [Outreachy kernel] " Julia Lawall
2017-03-11 14:53   ` Gargi Sharma

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=20160311172129.GA7885@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bhaktipriya96@gmail.com \
    --cc=outreachy-kernel@googlegroups.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.