Message ID | 20200405133906.381358-1-colin.king@canonical.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 09667ea7ce6d6a90152aeba631f11b55f283a898 |
Delegated to: | Kalle Valo |
Headers | show |
Series | brcm80211: remove redundant pointer 'address' | expand |
Colin King <colin.king@canonical.com> wrote: > From: Colin Ian King <colin.king@canonical.com> > > Pointer 'address' is being assigned and updated in a few places > by it is never read. Hence the assignments are redundant and can > be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King <colin.king@canonical.com> Patch applied to wireless-drivers-next.git, thanks. 09667ea7ce6d brcm80211: remove redundant pointer 'address'
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/commonring.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/commonring.c index 49db54d23e03..e44236cb210e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/commonring.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/commonring.c @@ -180,14 +180,8 @@ brcmf_commonring_reserve_for_write_multiple(struct brcmf_commonring *commonring, int brcmf_commonring_write_complete(struct brcmf_commonring *commonring) { - void *address; - - address = commonring->buf_addr; - address += (commonring->f_ptr * commonring->item_len); - if (commonring->f_ptr > commonring->w_ptr) { - address = commonring->buf_addr; + if (commonring->f_ptr > commonring->w_ptr) commonring->f_ptr = 0; - } commonring->f_ptr = commonring->w_ptr;