* [PATCH] staging: rtl8188eu: core: rtw_sta_mgt: Removed variables that is never used
@ 2015-01-31 14:45 Rickard Strandqvist
2015-01-31 16:19 ` Dan Carpenter
2015-02-01 4:20 ` Greg Kroah-Hartman
0 siblings, 2 replies; 5+ messages in thread
From: Rickard Strandqvist @ 2015-01-31 14:45 UTC (permalink / raw)
To: Greg Kroah-Hartman, Larry Finger
Cc: Rickard Strandqvist, navin patidar, Jia He, devel, linux-kernel
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);
plist = plist->next;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8188eu: core: rtw_sta_mgt: Removed variables that is never used
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:20 ` Greg Kroah-Hartman
1 sibling, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2015-01-31 16:19 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Greg Kroah-Hartman, Larry Finger, devel, Jia He, linux-kernel
On Sat, Jan 31, 2015 at 03:45:33PM +0100, Rickard Strandqvist wrote:
> while (phead != plist) {
> - psta = container_of(plist, struct sta_info , list);
> + container_of(plist, struct sta_info, list);
Argh!!! No.
For this one, I didn't need an context to see that it was wrong, so I
accidentally reviewed it instead of just marking it as read.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8188eu: core: rtw_sta_mgt: Removed variables that is never used
2015-01-31 16:19 ` Dan Carpenter
@ 2015-01-31 17:41 ` Larry Finger
2015-02-01 4:21 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2015-01-31 17:41 UTC (permalink / raw)
To: Dan Carpenter, Rickard Strandqvist, Greg Kroah-Hartman
Cc: devel, Jia He, linux-kernel
On 01/31/2015 10:19 AM, Dan Carpenter wrote:
> On Sat, Jan 31, 2015 at 03:45:33PM +0100, Rickard Strandqvist wrote:
>> while (phead != plist) {
>> - psta = container_of(plist, struct sta_info , list);
>> + container_of(plist, struct sta_info, list);
>
>
> Argh!!! No.
>
> For this one, I didn't need an context to see that it was wrong, so I
> accidentally reviewed it instead of just marking it as read.
>
Dan,
This guy does not have a brain - he only knows how to run cppcheck. You cannot
expect him to think about what he does. In addition, he does not have any of the
hardware that uses the drivers he is mangling. He can only test that it builds
correctly. Do not bother to ever review anything he sends.
Earlier this month, he submitted a set of patches that impacted routines that I
was working on. I asked him to hold those until I was finished to avoid
conflicts. Guess what? The same set was resubmitted 4 days later!!
He was told that sets of patches were supposed to be submitted with a [PATCH
X/Y] structure, but he has ignored that suggestion, thus there is no way to send
an overall NACK.
@Greg: Please put this guy on your permanent blacklist. It takes too much time
to read and respond to his multiple posts. Kalle has already done that for wireless.
Larry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8188eu: core: rtw_sta_mgt: Removed variables that is never used
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-02-01 4:20 ` Greg Kroah-Hartman
1 sibling, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2015-02-01 4:20 UTC (permalink / raw)
To: Rickard Strandqvist; +Cc: Larry Finger, devel, Jia He, linux-kernel
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}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8188eu: core: rtw_sta_mgt: Removed variables that is never used
2015-01-31 17:41 ` Larry Finger
@ 2015-02-01 4:21 ` Greg Kroah-Hartman
0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2015-02-01 4:21 UTC (permalink / raw)
To: Larry Finger
Cc: Dan Carpenter, Rickard Strandqvist, devel, Jia He, linux-kernel
On Sat, Jan 31, 2015 at 11:41:04AM -0600, Larry Finger wrote:
> On 01/31/2015 10:19 AM, Dan Carpenter wrote:
> >On Sat, Jan 31, 2015 at 03:45:33PM +0100, Rickard Strandqvist wrote:
> >> while (phead != plist) {
> >>- psta = container_of(plist, struct sta_info , list);
> >>+ container_of(plist, struct sta_info, list);
> >
> >
> >Argh!!! No.
> >
> >For this one, I didn't need an context to see that it was wrong, so I
> >accidentally reviewed it instead of just marking it as read.
> >
>
> Dan,
>
> This guy does not have a brain - he only knows how to run cppcheck. You
> cannot expect him to think about what he does. In addition, he does not have
> any of the hardware that uses the drivers he is mangling. He can only test
> that it builds correctly. Do not bother to ever review anything he sends.
>
> Earlier this month, he submitted a set of patches that impacted routines
> that I was working on. I asked him to hold those until I was finished to
> avoid conflicts. Guess what? The same set was resubmitted 4 days later!!
>
> He was told that sets of patches were supposed to be submitted with a [PATCH
> X/Y] structure, but he has ignored that suggestion, thus there is no way to
> send an overall NACK.
>
> @Greg: Please put this guy on your permanent blacklist. It takes too much
> time to read and respond to his multiple posts. Kalle has already done that
> for wireless.
I've now dropped all patches he recently sent me.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-02-01 4:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.