* [PATCH] staging: wilc1000: remove redundant masking of pkt_offset
@ 2019-05-21 13:17 Colin King
2019-05-21 18:43 ` Adham.Abozaeid
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-05-21 13:17 UTC (permalink / raw)
To: Adham Abozaeid, Ajay Singh, Greg Kroah-Hartman, linux-wireless,
devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The masking update of pkg_offset is redundant as the updated
value is never read and pkg_offset is re-assigned on the next
iteration of the loop. Clean this up by removing the redundant
assignment.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/staging/wilc1000/wilc_wlan.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 95eaf8fdf4f2..dcd728557958 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -709,9 +709,6 @@ static void wilc_wlan_handle_rx_buff(struct wilc *wilc, u8 *buffer, int size)
break;
if (pkt_offset & IS_MANAGMEMENT) {
- pkt_offset &= ~(IS_MANAGMEMENT |
- IS_MANAGMEMENT_CALLBACK |
- IS_MGMT_STATUS_SUCCES);
buff_ptr += HOST_HDR_OFFSET;
wilc_wfi_mgmt_rx(wilc, buff_ptr, pkt_len);
} else {
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] staging: wilc1000: remove redundant masking of pkt_offset
2019-05-21 13:17 [PATCH] staging: wilc1000: remove redundant masking of pkt_offset Colin King
@ 2019-05-21 18:43 ` Adham.Abozaeid
0 siblings, 0 replies; 2+ messages in thread
From: Adham.Abozaeid @ 2019-05-21 18:43 UTC (permalink / raw)
To: colin.king, Ajay.Kathat, gregkh, linux-wireless, devel
Cc: kernel-janitors, linux-kernel
On 5/21/19 6:17 AM, Colin King wrote:
> External E-Mail
>
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The masking update of pkg_offset is redundant as the updated
> value is never read and pkg_offset is re-assigned on the next
> iteration of the loop. Clean this up by removing the redundant
> assignment.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Thanks,
Adham
> ---
> drivers/staging/wilc1000/wilc_wlan.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
> index 95eaf8fdf4f2..dcd728557958 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.c
> +++ b/drivers/staging/wilc1000/wilc_wlan.c
> @@ -709,9 +709,6 @@ static void wilc_wlan_handle_rx_buff(struct wilc *wilc, u8 *buffer, int size)
> break;
>
> if (pkt_offset & IS_MANAGMEMENT) {
> - pkt_offset &= ~(IS_MANAGMEMENT |
> - IS_MANAGMEMENT_CALLBACK |
> - IS_MGMT_STATUS_SUCCES);
> buff_ptr += HOST_HDR_OFFSET;
> wilc_wfi_mgmt_rx(wilc, buff_ptr, pkt_len);
> } else {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-21 18:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-21 13:17 [PATCH] staging: wilc1000: remove redundant masking of pkt_offset Colin King
2019-05-21 18:43 ` Adham.Abozaeid
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox