public inbox for ath12k@lists.infradead.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: Sriram R <quic_srirrama@quicinc.com>,
	 llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	 Jeff Johnson <jjohnson@kernel.org>,
	ath12k@lists.infradead.org,  Kalle Valo <quic_kvalo@quicinc.com>,
	Rameshkumar Sundaram <quic_ramess@quicinc.com>
Subject: Re: [ath:ath12k-mlo 38/63] drivers/net/wireless/ath/ath12k/mac.c:3981:8: warning: variable 'ret' is uninitialized when used here
Date: Mon, 16 Sep 2024 11:57:05 +0300	[thread overview]
Message-ID: <87ed5kdli6.fsf@kernel.org> (raw)
In-Reply-To: <202409151853.OfodBWj3-lkp@intel.com> (kernel test robot's message of "Sun, 15 Sep 2024 18:30:54 +0800")

kernel test robot <lkp@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@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


      reply	other threads:[~2024-09-16  8:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-15 10:30 [ath:ath12k-mlo 38/63] drivers/net/wireless/ath/ath12k/mac.c:3981:8: warning: variable 'ret' is uninitialized when used here kernel test robot
2024-09-16  8:57 ` Kalle Valo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ed5kdli6.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ath12k@lists.infradead.org \
    --cc=jjohnson@kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=quic_kvalo@quicinc.com \
    --cc=quic_ramess@quicinc.com \
    --cc=quic_srirrama@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox