Message ID | 20180130182537.5580-1-colin.king@canonical.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 76d1f95983a0903eaff857ba1e4ec0ac9febf225 |
Delegated to: | Kalle Valo |
Headers | show |
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) {
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@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? > The patch is obviously correct, I don't understand the question. regards, dan carpenter
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'
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) {