From: Nishka Dasgupta <nishkadg.linux@gmail.com>
To: larry.finger@lwfinger.net, florian.c.schilhabel@googlemail.com,
gregkh@linuxfoundation.org, himadri18.07@gmail.com,
daniela.mormocea@gmail.com, straube.linux@gmail.com,
vatsalanarang@gmail.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Cc: Nishka Dasgupta <nishkadg.linux@gmail.com>
Subject: [PATCH] staging: rtl8712: Remove unnecessary variable in rtl8712_recv.c
Date: Wed, 29 May 2019 18:50:31 +0530 [thread overview]
Message-ID: <20190529132031.6493-1-nishkadg.linux@gmail.com> (raw)
Remove unnecessary variable last_evm in rtl8712_recv.c and use its value
directly.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
drivers/staging/rtl8712/rtl8712_recv.c | 5 ++---
drivers/staging/rtl8712/rtl871x_cmd.c | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c
index 82ddc0c3ecd4..f6f7cd5fd0f2 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.c
+++ b/drivers/staging/rtl8712/rtl8712_recv.c
@@ -885,7 +885,7 @@ static void query_rx_phy_status(struct _adapter *padapter,
static void process_link_qual(struct _adapter *padapter,
union recv_frame *prframe)
{
- u32 last_evm = 0, tmpVal;
+ u32 tmpVal;
struct rx_pkt_attrib *pattrib;
struct smooth_rssi_data *sqd = &padapter->recvpriv.signal_qual_data;
@@ -898,8 +898,7 @@ static void process_link_qual(struct _adapter *padapter,
*/
if (sqd->total_num++ >= PHY_LINKQUALITY_SLID_WIN_MAX) {
sqd->total_num = PHY_LINKQUALITY_SLID_WIN_MAX;
- last_evm = sqd->elements[sqd->index];
- sqd->total_val -= last_evm;
+ sqd->total_val -= sqd->elements[sqd->index];
}
sqd->total_val += pattrib->signal_qual;
sqd->elements[sqd->index++] = pattrib->signal_qual;
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
index 05a78ac24987..7c437ee9e022 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.c
+++ b/drivers/staging/rtl8712/rtl871x_cmd.c
@@ -880,7 +880,7 @@ void r8712_createbss_cmd_callback(struct _adapter *padapter,
}
r8712_indicate_connect(padapter);
} else {
- pwlan = _r8712_alloc_network(pmlmepriv);
+ pwlan = r8712_alloc_network(pmlmepriv);
if (!pwlan) {
pwlan = r8712_get_oldest_wlan_network(
&pmlmepriv->scanned_queue);
--
2.19.1
next reply other threads:[~2019-05-29 13:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 13:20 Nishka Dasgupta [this message]
2019-05-30 21:12 ` [PATCH] staging: rtl8712: Remove unnecessary variable in rtl8712_recv.c Greg KH
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=20190529132031.6493-1-nishkadg.linux@gmail.com \
--to=nishkadg.linux@gmail.com \
--cc=daniela.mormocea@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=florian.c.schilhabel@googlemail.com \
--cc=gregkh@linuxfoundation.org \
--cc=himadri18.07@gmail.com \
--cc=larry.finger@lwfinger.net \
--cc=linux-kernel@vger.kernel.org \
--cc=straube.linux@gmail.com \
--cc=vatsalanarang@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