Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* re: ath11k: initialize wmi config based on hw_params
@ 2020-08-19 11:05 Colin Ian King
  2020-09-17 15:04 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2020-08-19 11:05 UTC (permalink / raw)
  To: Kalle Valo, Carl Huang, David S. Miller, Jakub Kicinski, ath11k,
	linux-wireless, netdev
  Cc: linux-kernel

Hi,

static analysis with Coverity has detected a duplicated assignment issue
with the following commit:

commit 2d4bcbed5b7d53e19fc158885e7340b464b64507
Author: Carl Huang <cjhuang@codeaurora.org>
Date:   Mon Aug 17 13:31:51 2020 +0300

    ath11k: initialize wmi config based on hw_params

The analysis is as follows:


 74        config->beacon_tx_offload_max_vdev = 0x2;
 75        config->num_multicast_filter_entries = 0x20;
 76        config->num_wow_filters = 0x16;

Unused value (UNUSED_VALUE)
assigned_value: Assigning value 1U to config->num_keep_alive_pattern
here, but that stored value is overwritten before it can be used.
 77        config->num_keep_alive_pattern = 0x1;

value_overwrite: Overwriting previous write to
config->num_keep_alive_pattern with value 0U.

 78        config->num_keep_alive_pattern = 0;


I'm not sure if one of these assignments is redundant, or perhaps one of
the assignments is meant to be setting a different structure element.

Colin

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

* Re: ath11k: initialize wmi config based on hw_params
  2020-08-19 11:05 ath11k: initialize wmi config based on hw_params Colin Ian King
@ 2020-09-17 15:04 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-09-17 15:04 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Carl Huang, David S. Miller, Jakub Kicinski, ath11k,
	linux-wireless, netdev, linux-kernel

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

> Hi,
>
> static analysis with Coverity has detected a duplicated assignment issue
> with the following commit:
>
> commit 2d4bcbed5b7d53e19fc158885e7340b464b64507
> Author: Carl Huang <cjhuang@codeaurora.org>
> Date:   Mon Aug 17 13:31:51 2020 +0300
>
>     ath11k: initialize wmi config based on hw_params
>
> The analysis is as follows:
>
>
>  74        config->beacon_tx_offload_max_vdev = 0x2;
>  75        config->num_multicast_filter_entries = 0x20;
>  76        config->num_wow_filters = 0x16;
>
> Unused value (UNUSED_VALUE)
> assigned_value: Assigning value 1U to config->num_keep_alive_pattern
> here, but that stored value is overwritten before it can be used.
>  77        config->num_keep_alive_pattern = 0x1;
>
> value_overwrite: Overwriting previous write to
> config->num_keep_alive_pattern with value 0U.
>
>  78        config->num_keep_alive_pattern = 0;
>
>
> I'm not sure if one of these assignments is redundant, or perhaps one of
> the assignments is meant to be setting a different structure element.

0x1 assignment should be removed, I'll send a patch.

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

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

end of thread, other threads:[~2020-09-17 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19 11:05 ath11k: initialize wmi config based on hw_params Colin Ian King
2020-09-17 15:04 ` 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).