[ath:ath12k-mlo 38/63] drivers/net/wireless/ath/ath12k/mac.c:3981:8: warning: variable 'ret' is uninitialized when used here
Kalle Valo
kvalo at kernel.org
Mon Sep 16 01:57:05 PDT 2024
kernel test robot <lkp at intel.com> writes:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git ath12k-mlo
> head: 8f61af03fddc0a30bdf49e06a13eafff3cec91b0
> commit: 0b9b7a1eece8952bde6e7f3c764e20a5ee11d3f7 [38/63] wifi: ath12k:
> modify link arvif creation and removal for MLO
> config: x86_64-allyesconfig
> (https://download.01.org/0day-ci/archive/20240915/202409151853.OfodBWj3-lkp@intel.com/config)
> compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
> reproduce (this is a W=1 build):
> (https://download.01.org/0day-ci/archive/20240915/202409151853.OfodBWj3-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp at intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202409151853.OfodBWj3-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/net/wireless/ath/ath12k/mac.c:3981:8: warning: variable
> 'ret' is uninitialized when used here [-Wuninitialized]
> 3981 | if (ret)
> | ^~~
> drivers/net/wireless/ath/ath12k/mac.c:3931:9: note: initialize the variable 'ret' to silence this warning
> 3931 | int ret;
> | ^
> | = 0
> drivers/net/wireless/ath/ath12k/mac.c:4434:8: warning: variable
> 'ret' is used uninitialized whenever 'if' condition is true
> [-Wsometimes-uninitialized]
> 4434 | if (WARN_ON(!arvif))
> | ^~~~~~~~~~~~~~~
> include/asm-generic/bug.h:122:28: note: expanded from macro 'WARN_ON'
> 122 | #define WARN_ON(condition) ({ \
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 123 | int __ret_warn_on = !!(condition); \
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 124 | if (unlikely(__ret_warn_on)) \
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 125 | __WARN(); \
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 126 | unlikely(__ret_warn_on); \
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 127 | })
> | ~~
> drivers/net/wireless/ath/ath12k/mac.c:4467:9: note: uninitialized use occurs here
> 4467 | return ret;
> | ^~~
> drivers/net/wireless/ath/ath12k/mac.c:4434:4: note: remove the 'if' if its condition is always false
> 4434 | if (WARN_ON(!arvif))
> | ^~~~~~~~~~~~~~~~~~~~
> 4435 | goto out;
> | ~~~~~~~~
> drivers/net/wireless/ath/ath12k/mac.c:4390:9: note: initialize the variable 'ret' to silence this warning
> 4390 | int ret;
> | ^
> | = 0
> drivers/net/wireless/ath/ath12k/mac.c:9114:8: warning: variable
> 'ret' is uninitialized when used here [-Wuninitialized]
> 9114 | if (ret) {
> | ^~~
> drivers/net/wireless/ath/ath12k/mac.c:9068:9: note: initialize the variable 'ret' to silence this warning
> 9068 | int ret;
> | ^
> | = 0
> 3 warnings generated.
Fixed these as well.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
More information about the ath12k
mailing list