From: kernel test robot <lkp@intel.com>
To: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Johannes Berg <johannes.berg@intel.com>,
Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [linux-next:master 9215/13775] drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:513:16: warning: variable 'ret' is uninitialized when used here
Date: Thu, 27 Mar 2025 09:16:34 +0800 [thread overview]
Message-ID: <202503271133.8XFKhu8E-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 0e871365f7f9aeb9b590e345458b2083e067cd13
commit: 834bfc698bf7cee3bf61c0209b410c7f97a54108 [9215/13775] wifi: iwlwifi: mld: fix build with CONFIG_PM_SLEEP undefined
config: x86_64-randconfig-004-20250327 (https://download.01.org/0day-ci/archive/20250327/202503271133.8XFKhu8E-lkp@intel.com/config)
compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250327/202503271133.8XFKhu8E-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/202503271133.8XFKhu8E-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:12:
drivers/net/wireless/intel/iwlwifi/mld/iface.h:170:5: warning: 'CONFIG_PM_SLEEP' is not defined, evaluates to 0 [-Wundef]
170 | #if CONFIG_PM_SLEEP
| ^
>> drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:513:16: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
513 | if (!in_d3 || ret) {
| ^~~
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:487:9: note: initialize the variable 'ret' to silence this warning
487 | int ret;
| ^
| = 0
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:1942:13: warning: unused function 'iwl_mld_set_wakeup' [-Wunused-function]
1942 | static void iwl_mld_set_wakeup(struct ieee80211_hw *hw, bool enabled)
| ^~~~~~~~~~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:1956:1: warning: unused function 'iwl_mld_suspend' [-Wunused-function]
1956 | iwl_mld_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
| ^~~~~~~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:1978:12: warning: unused function 'iwl_mld_resume' [-Wunused-function]
1978 | static int iwl_mld_resume(struct ieee80211_hw *hw)
| ^~~~~~~~~~~~~~
5 warnings generated.
vim +/ret +513 drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
d1e879ec600f9b3 Miri Korenblit 2025-02-16 507
d1e879ec600f9b3 Miri Korenblit 2025-02-16 508 if (mld->fw_status.in_hw_restart) {
d1e879ec600f9b3 Miri Korenblit 2025-02-16 509 iwl_mld_stop_fw(mld);
d1e879ec600f9b3 Miri Korenblit 2025-02-16 510 iwl_mld_restart_cleanup(mld);
d1e879ec600f9b3 Miri Korenblit 2025-02-16 511 }
d1e879ec600f9b3 Miri Korenblit 2025-02-16 512
d1e879ec600f9b3 Miri Korenblit 2025-02-16 @513 if (!in_d3 || ret) {
d1e879ec600f9b3 Miri Korenblit 2025-02-16 514 ret = iwl_mld_start_fw(mld);
d1e879ec600f9b3 Miri Korenblit 2025-02-16 515 if (ret)
d1e879ec600f9b3 Miri Korenblit 2025-02-16 516 goto error;
d1e879ec600f9b3 Miri Korenblit 2025-02-16 517 }
d1e879ec600f9b3 Miri Korenblit 2025-02-16 518
d1e879ec600f9b3 Miri Korenblit 2025-02-16 519 mld->scan.last_start_time_jiffies = jiffies;
d1e879ec600f9b3 Miri Korenblit 2025-02-16 520
d1e879ec600f9b3 Miri Korenblit 2025-02-16 521 iwl_dbg_tlv_time_point(&mld->fwrt, IWL_FW_INI_TIME_POINT_POST_INIT,
d1e879ec600f9b3 Miri Korenblit 2025-02-16 522 NULL);
d1e879ec600f9b3 Miri Korenblit 2025-02-16 523 iwl_dbg_tlv_time_point(&mld->fwrt, IWL_FW_INI_TIME_POINT_PERIODIC,
d1e879ec600f9b3 Miri Korenblit 2025-02-16 524 NULL);
d1e879ec600f9b3 Miri Korenblit 2025-02-16 525
d1e879ec600f9b3 Miri Korenblit 2025-02-16 526 return 0;
d1e879ec600f9b3 Miri Korenblit 2025-02-16 527
d1e879ec600f9b3 Miri Korenblit 2025-02-16 528 error:
d1e879ec600f9b3 Miri Korenblit 2025-02-16 529 /* If we failed to restart the hw, there is nothing useful
d1e879ec600f9b3 Miri Korenblit 2025-02-16 530 * we can do but indicate we are no longer in restart.
d1e879ec600f9b3 Miri Korenblit 2025-02-16 531 */
d1e879ec600f9b3 Miri Korenblit 2025-02-16 532 mld->fw_status.in_hw_restart = false;
d1e879ec600f9b3 Miri Korenblit 2025-02-16 533
d1e879ec600f9b3 Miri Korenblit 2025-02-16 534 return ret;
d1e879ec600f9b3 Miri Korenblit 2025-02-16 535 }
d1e879ec600f9b3 Miri Korenblit 2025-02-16 536
:::::: The code at line 513 was first introduced by commit
:::::: d1e879ec600f9b3bdd253167533959facfefb17b wifi: iwlwifi: add iwlmld sub-driver
:::::: TO: Miri Korenblit <miriam.rachel.korenblit@intel.com>
:::::: CC: Johannes Berg <johannes.berg@intel.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-03-27 1:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202503271133.8XFKhu8E-lkp@intel.com \
--to=lkp@intel.com \
--cc=emmanuel.grumbach@intel.com \
--cc=johannes.berg@intel.com \
--cc=llvm@lists.linux.dev \
--cc=miriam.rachel.korenblit@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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