From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
devel@driverdev.osuosl.org, Jia He <hejianet@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8188eu: core: rtw_sta_mgt: Removed variables that is never used
Date: Sat, 31 Jan 2015 20:20:47 -0800 [thread overview]
Message-ID: <20150201042047.GB25151@kroah.com> (raw)
In-Reply-To: <1422715533-915-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
On Sat, Jan 31, 2015 at 03:45:33PM +0100, Rickard Strandqvist wrote:
> Variable was assigned a value that was never used.
> I have also removed all the code that thereby serves no purpose.
>
> This was found using a static code analysis program called cppcheck
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
> drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
> index dc9d0dd..1e737ed 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
> @@ -149,7 +149,6 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int
> static void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
> {
> struct list_head *plist, *phead;
> - struct sta_info *psta = NULL;
>
>
> spin_lock_bh(&pstapriv->sta_hash_lock);
> @@ -158,7 +157,7 @@ static void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
> plist = phead->next;
>
> while (phead != plist) {
> - psta = container_of(plist, struct sta_info , list);
> + container_of(plist, struct sta_info, list);
How did this patch even compile?
{sigh}
prev parent reply other threads:[~2015-02-01 4:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-31 14:45 [PATCH] staging: rtl8188eu: core: rtw_sta_mgt: Removed variables that is never used Rickard Strandqvist
2015-01-31 16:19 ` Dan Carpenter
2015-01-31 17:41 ` Larry Finger
2015-02-01 4:21 ` Greg Kroah-Hartman
2015-02-01 4:20 ` Greg Kroah-Hartman [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=20150201042047.GB25151@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=hejianet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rickard_strandqvist@spectrumdigital.se \
/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