From: Greg KH <gregkh@linuxfoundation.org>
To: Nishka Dasgupta <nishkadg.linux@gmail.com>
Cc: larry.finger@lwfinger.net, florian.c.schilhabel@googlemail.com,
himadri18.07@gmail.com, daniela.mormocea@gmail.com,
straube.linux@gmail.com, vatsalanarang@gmail.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8712: Remove unnecessary variable in rtl8712_recv.c
Date: Thu, 30 May 2019 14:12:44 -0700 [thread overview]
Message-ID: <20190530211244.GA24020@kroah.com> (raw)
In-Reply-To: <20190529132031.6493-1-nishkadg.linux@gmail.com>
On Wed, May 29, 2019 at 06:50:31PM +0530, Nishka Dasgupta wrote:
> 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];
Nope, original code is easier to understand :(
> }
> 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);
what does this change have to do with your changelog?
confused,
greg k-h
prev parent reply other threads:[~2019-05-30 21:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 13:20 [PATCH] staging: rtl8712: Remove unnecessary variable in rtl8712_recv.c Nishka Dasgupta
2019-05-30 21:12 ` Greg KH [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=20190530211244.GA24020@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=daniela.mormocea@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=florian.c.schilhabel@googlemail.com \
--cc=himadri18.07@gmail.com \
--cc=larry.finger@lwfinger.net \
--cc=linux-kernel@vger.kernel.org \
--cc=nishkadg.linux@gmail.com \
--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