netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wireless: zd1211rw: remove redundant assignment of pointer 'q'
@ 2018-01-30 18:25 Colin King
  2018-01-31 12:58 ` Andy Shevchenko
  2018-02-27 16:17 ` Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: Colin King @ 2018-01-30 18:25 UTC (permalink / raw)
  To: Daniel Drake, Ulrich Kunitz, Kalle Valo, linux-wireless, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Pointer q is initialized and then almost immediately afterwards being
re-assigned the same value. Remove the second redundant assignment.

Cleans up clang warning:
drivers/net/wireless/zydas/zd1211rw/zd_mac.c:503:23: warning: Value
stored to 'q' during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c
index b785742bfd9e..b01b44a5d16e 100644
--- a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c
@@ -509,7 +509,6 @@ void zd_mac_tx_failed(struct urb *urb)
 	int found = 0;
 	int i, position = 0;
 
-	q = &mac->ack_wait_queue;
 	spin_lock_irqsave(&q->lock, flags);
 
 	skb_queue_walk(q, skb) {
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] wireless: zd1211rw: remove redundant assignment of pointer 'q'
  2018-01-30 18:25 [PATCH] wireless: zd1211rw: remove redundant assignment of pointer 'q' Colin King
@ 2018-01-31 12:58 ` Andy Shevchenko
       [not found]   ` <CAHp75Vc_8v3qxWjtT4B3Kvz4dNZ8=-+uRPs-iTK3o8Taa4Swgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2018-02-27 16:17 ` Kalle Valo
  1 sibling, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2018-01-31 12:58 UTC (permalink / raw)
  To: Colin King
  Cc: Daniel Drake, Ulrich Kunitz, Kalle Valo,
	open list:TI WILINK WIRELES..., netdev, kernel-janitors,
	Linux Kernel Mailing List

On Tue, Jan 30, 2018 at 8:25 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer q is initialized and then almost immediately afterwards being
> re-assigned the same value. Remove the second redundant assignment.
>

Don't you see strange that in the same context of the patch two users
of q are present?

How did you test this?

> Cleans up clang warning:
> drivers/net/wireless/zydas/zd1211rw/zd_mac.c:503:23: warning: Value
> stored to 'q' during its initialization is never read

> -       q = &mac->ack_wait_queue;
>         spin_lock_irqsave(&q->lock, flags);
>
>         skb_queue_walk(q, skb) {



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] wireless: zd1211rw: remove redundant assignment of pointer 'q'
       [not found]   ` <CAHp75Vc_8v3qxWjtT4B3Kvz4dNZ8=-+uRPs-iTK3o8Taa4Swgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-01-31 14:57     ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2018-01-31 14:57 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Colin King, Daniel Drake, Ulrich Kunitz, Kalle Valo,
	open list:TI WILINK WIRELES..., netdev,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA, Linux Kernel Mailing List

On Wed, Jan 31, 2018 at 02:58:57PM +0200, Andy Shevchenko wrote:
> On Tue, Jan 30, 2018 at 8:25 PM, Colin King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> wrote:
> > From: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> >
> > Pointer q is initialized and then almost immediately afterwards being
> > re-assigned the same value. Remove the second redundant assignment.
> >
> 
> Don't you see strange that in the same context of the patch two users
> of q are present?
> 
> How did you test this?
> 

The patch is obviously correct, I don't understand the question.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: wireless: zd1211rw: remove redundant assignment of pointer 'q'
  2018-01-30 18:25 [PATCH] wireless: zd1211rw: remove redundant assignment of pointer 'q' Colin King
  2018-01-31 12:58 ` Andy Shevchenko
@ 2018-02-27 16:17 ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2018-02-27 16:17 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Daniel Drake, Ulrich Kunitz, linux-wireless, netdev,
	kernel-janitors, linux-kernel

Colin Ian King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointer q is initialized and then almost immediately afterwards being
> re-assigned the same value. Remove the second redundant assignment.
> 
> Cleans up clang warning:
> drivers/net/wireless/zydas/zd1211rw/zd_mac.c:503:23: warning: Value
> stored to 'q' during its initialization is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Patch applied to wireless-drivers-next.git, thanks.

76d1f95983a0 wireless: zd1211rw: remove redundant assignment of pointer 'q'

-- 
https://patchwork.kernel.org/patch/10192195/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-27 16:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-30 18:25 [PATCH] wireless: zd1211rw: remove redundant assignment of pointer 'q' Colin King
2018-01-31 12:58 ` Andy Shevchenko
     [not found]   ` <CAHp75Vc_8v3qxWjtT4B3Kvz4dNZ8=-+uRPs-iTK3o8Taa4Swgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-31 14:57     ` Dan Carpenter
2018-02-27 16:17 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).