All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Himadri Pandya <himadri18.07@gmail.com>
Cc: gregkh@linuxfoundation.org, outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] staging: rtlwifi: phydm: remove unnecessary parentheses
Date: Sat, 9 Mar 2019 19:09:15 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.1903091908000.13389@hadrien> (raw)
In-Reply-To: <20190309180212.54071-1-himadri18.07@gmail.com>



On Sat, 9 Mar 2019, Himadri Pandya wrote:

> Remove unnecessary parentheses around the right hand side of assignment
> operator. Suggested by Coccinelle.

Actually, I'm not sure that "Suggested by Coccinelle" is the best
phrasing.  Coccinelle doesn't suggest things on its own.  You write a
semantic patch, and then the semantic patch suggests something.  Found
using Coccinelle would be better.

julia

>
> Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
> ---
>  drivers/staging/rtlwifi/phydm/phydm.c          | 2 +-
>  drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtlwifi/phydm/phydm.c b/drivers/staging/rtlwifi/phydm/phydm.c
> index 52b85b3ddb34..a69be1c19f25 100644
> --- a/drivers/staging/rtlwifi/phydm/phydm.c
> +++ b/drivers/staging/rtlwifi/phydm/phydm.c
> @@ -1767,7 +1767,7 @@ static u8 phydm_calculate_intf_distance(void *dm_void, u32 bw, u32 fc,
>  		int_distance = (fc >= f_interference) ? (fc - f_interference) :
>  							(f_interference - fc);
>  		tone_idx_tmp =
> -			(int_distance << 5); /* =10*(int_distance /0.3125) */
> +			int_distance << 5; /* =10*(int_distance /0.3125) */
>  		ODM_RT_TRACE(
>  			dm, ODM_COMP_API,
>  			"int_distance = ((%d MHz)) Mhz, tone_idx_tmp = ((%d.%d))\n",
> diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> index a4ad39ab3ddf..4d2630e63789 100644
> --- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> +++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> @@ -1790,7 +1790,7 @@ phydm_process_rssi_for_dm_new_type(struct phy_dm_struct *dm,
>
>  		if (undecorated_smoothed_pwdb <= 0) {
>  			accumulate_pwdb =
> -				(phy_info->rx_pwdb_all << scaling_factor);
> +				phy_info->rx_pwdb_all << scaling_factor;
>  			undecorated_smoothed_pwdb = phy_info->rx_pwdb_all;
>  		} else {
>  			accumulate_pwdb = accumulate_pwdb -
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190309180212.54071-1-himadri18.07%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


  reply	other threads:[~2019-03-09 18:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-09 18:02 [PATCH] staging: rtlwifi: phydm: remove unnecessary parentheses Himadri Pandya
2019-03-09 18:09 ` Julia Lawall [this message]
2019-03-09 18:16 ` [PATCH v2] " Himadri Pandya

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=alpine.DEB.2.21.1903091908000.13389@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=himadri18.07@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.