[lvc-project] [PATCH 6.1] wifi: iwlwifi: assume known PNVM power table size
Johannes Berg
johannes at sipsolutions.net
Wed Jan 29 13:48:56 MSK 2025
On Wed, 2025-01-29 at 13:31 +0300, Dmitry Antipov wrote:
> In 'iwl_pnvm_load()', assume that the power table size is always
> equal to IWL_HARDCODED_REDUCE_POWER_SIZE. Compile tested only.
>
> Signed-off-by: Dmitry Antipov <dmantipov at yandex.ru>
> ---
> I would gently ask Johannes to review this before taking any other
> actions. This is intended for stable linux-6.1.y only in attempt to
> avoid possible use of an uninitialized 'len' without backporting
I don't see that there's uninitialized use of 'len'. Maybe some static
checkers aren't seeing through this, but the code is fine:
If iwl_pnvm_get_from_fs() is successful, then 'len' is initialized. If
it fails, we goto skip_parse.
There, if trans->reduce_power_loaded is false, 'len' again is either
initialized or we go to skip_reduce_power and never use 'len'.
If trans->reduce_power_loaded is true, then we get to
iwl_trans_pcie_ctx_info_gen3_set_reduce_power() which doesn't use 'len'
in this case.
I'd rather not fix this non-problem in a very confusing way.
johannes
More information about the lvc-project
mailing list