From: "Harisangam, Sharvari (S.)" <sharisan@visteon.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Lorenzo Stoakes <lstoakes@gmail.com>,
Cristina Opriceana <cristina.opriceana@gmail.com>,
"Greg Donald" <gdonald@gmail.com>,
Karthik Nayak <karthik.188@gmail.com>,
"Vaishali Thakkar" <vthakkar1994@gmail.com>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Removed unnecessary bool comparisons in r8192U_dm.c
Date: Thu, 11 Jun 2015 10:44:42 +0000 [thread overview]
Message-ID: <20150611104431.GA45115@ubuntu> (raw)
In-Reply-To: <20150611091621.GA44785@ubuntu>
On Thu, Jun 11, 2015 at 02:46:21PM +0530, Harisangam Sharvari wrote:
> From: Harisangam Sharvari <sharisan@visteon.com>
>
> This patch was detected with the help of coccinelle tool.
> The unnecessary comparisons of bool variables are removed.
>
> Signed-off-by: Harisangam Sharvari <sharisan@visteon.com>
> ---
> drivers/staging/rtl8192u/r8192U_dm.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
> index 12dd19e..cf3537a 100644
> --- a/drivers/staging/rtl8192u/r8192U_dm.c
> +++ b/drivers/staging/rtl8192u/r8192U_dm.c
> @@ -563,7 +563,7 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev)
> break;
> }
> }
> - if (viviflag == true) {
> + if (viviflag) {
> write_nic_byte(dev, 0x1ba, 0);
> viviflag = false;
> RT_TRACE(COMP_POWER_TRACKING, "we filtered the data\n");
> @@ -766,7 +766,7 @@ void dm_txpower_trackingcallback(struct work_struct *work)
> struct r8192_priv *priv = container_of(dwork, struct r8192_priv, txpower_tracking_wq);
> struct net_device *dev = priv->ieee80211->dev;
>
> - if (priv->bDcut == true)
> + if (priv->bDcut)
> dm_TXPowerTrackingCallback_TSSI(dev);
> else
> dm_TXPowerTrackingCallback_ThermalMeter(dev);
> @@ -1301,7 +1301,7 @@ void dm_initialize_txpower_tracking(struct net_device *dev)
> {
> struct r8192_priv *priv = ieee80211_priv(dev);
>
> - if (priv->bDcut == true)
> + if (priv->bDcut)
> dm_InitializeTXPowerTracking_TSSI(dev);
> else
> dm_InitializeTXPowerTracking_ThermalMeter(dev);
> @@ -1357,7 +1357,7 @@ static void dm_check_txpower_tracking(struct net_device *dev)
> #ifdef RTL8190P
> dm_CheckTXPowerTracking_TSSI(dev);
> #else
> - if (priv->bDcut == true)
> + if (priv->bDcut)
> dm_CheckTXPowerTracking_TSSI(dev);
> else
> dm_CheckTXPowerTracking_ThermalMeter(dev);
> @@ -1467,7 +1467,7 @@ void dm_cck_txpower_adjust(struct net_device *dev, bool binch14)
> { /* dm_CCKTxPowerAdjust */
> struct r8192_priv *priv = ieee80211_priv(dev);
>
> - if (priv->bDcut == true)
> + if (priv->bDcut)
> dm_CCKTxPowerAdjust_TSSI(dev, binch14);
> else
> dm_CCKTxPowerAdjust_ThermalMeter(dev, binch14);
> @@ -3062,7 +3062,7 @@ static void dm_dynamic_txpower(struct net_device *dev)
> priv->bDynamicTxLowPower = false;
> } else {
> /* high power state check */
> - if (priv->undecorated_smoothed_pwdb < txlowpower_threshold && priv->bDynamicTxHighPower == true)
> + if (priv->undecorated_smoothed_pwdb < txlowpower_threshold && priv->bDynamicTxHighPower)
> priv->bDynamicTxHighPower = false;
>
> /* low power state check */
> --
> 1.7.9.5
I found that there are some errors in patch submission. Please discard this patch.
I will send the new patch.
Thanks,
Harisangam Sharvari
prev parent reply other threads:[~2015-06-11 10:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-11 9:16 [PATCH] Removed unnecessary bool comparisons in r8192U_dm.c Harisangam, Sharvari (S.)
2015-06-11 10:44 ` Harisangam, Sharvari (S.) [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=20150611104431.GA45115@ubuntu \
--to=sharisan@visteon.com \
--cc=cristina.opriceana@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gdonald@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=karthik.188@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lstoakes@gmail.com \
--cc=vthakkar1994@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox