From: "Dhere, Chaitanya (C.)" <cvijaydh@visteon.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"cristina.opriceana@gmail.com" <cristina.opriceana@gmail.com>,
"hamohammed.sa@gmail.com" <hamohammed.sa@gmail.com>,
"gdonald@gmail.com" <gdonald@gmail.com>,
"mahfouz.saif.elyazal@gmail.com" <mahfouz.saif.elyazal@gmail.com>,
"benoit.taine@lip6.fr" <benoit.taine@lip6.fr>,
"paul.gortmaker@windriver.com" <paul.gortmaker@windriver.com>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] staging: rtl8192u: Patch to modify if, else conditions
Date: Tue, 19 May 2015 16:55:57 +0000 [thread overview]
Message-ID: <20150519165543.GA2801@chaitanya-Ideapad-Z560> (raw)
In this patch:
1. the if condition is modified to remove
the unnecessary equality check.
2. The else if condition is replaced by an else condition
since the variable checked in the if statement is a bool
making the else if unnecessary.
3. Fixed indentation problem on line 1369.
These changes were detected with help of coccinelle tool.
Signed-off-by: Chaitanya Dhere <cvijaydh@visteon.com>
---
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index d2e8b12..41f74ab 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -1364,12 +1364,11 @@ static void ieee80211_associate_complete_wq(struct work_struct *work)
ieee->LinkDetectInfo.NumRecvDataInPeriod= 1;
}
ieee->link_change(ieee->dev);
- if(ieee->is_silent_reset == 0){
+ if (!ieee->is_silent_reset) {
printk("============>normal associate\n");
- notify_wx_assoc_event(ieee);
+ notify_wx_assoc_event(ieee);
}
- else if(ieee->is_silent_reset == 1)
- {
+ else {
printk("==================>silent reset associate\n");
ieee->is_silent_reset = false;
}
--
1.9.1
next reply other threads:[~2015-05-19 16:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-19 16:55 Dhere, Chaitanya (C.) [this message]
2015-05-31 1:38 ` gregkh
2015-06-01 5:40 ` Dhere, Chaitanya (C.)
2015-06-02 5:13 ` Dhere, Chaitanya (C.)
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=20150519165543.GA2801@chaitanya-Ideapad-Z560 \
--to=cvijaydh@visteon.com \
--cc=benoit.taine@lip6.fr \
--cc=cristina.opriceana@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gdonald@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hamohammed.sa@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mahfouz.saif.elyazal@gmail.com \
--cc=paul.gortmaker@windriver.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
all inboxes | Powered by JetHome®