From: kernel test robot <lkp@intel.com>
To: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Johannes Berg <johannes.berg@intel.com>,
Gregory Greenman <gregory.greenman@intel.com>
Subject: drivers/net/wireless/intel/iwlwifi/mvm/time-event.c:705 iwl_mvm_get_session_prot_id() warn: unsigned 'link_id' is never less than zero.
Date: Mon, 27 Nov 2023 11:11:19 +0800 [thread overview]
Message-ID: <202311270932.ewkH5ZT0-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d2da77f431ac49b5763b88751a75f70daa46296c
commit: 1350658373106eace418eea673a058a0285f8334 wifi: iwlwifi: support link_id in SESSION_PROTECTION cmd
date: 5 weeks ago
config: powerpc-randconfig-r071-20231126 (https://download.01.org/0day-ci/archive/20231127/202311270932.ewkH5ZT0-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231127/202311270932.ewkH5ZT0-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/202311270932.ewkH5ZT0-lkp@intel.com/
smatch warnings:
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c:705 iwl_mvm_get_session_prot_id() warn: unsigned 'link_id' is never less than zero.
vim +/link_id +705 drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
691
692 /* Determine whether mac or link id should be used, and validate the link id */
693 static int iwl_mvm_get_session_prot_id(struct iwl_mvm *mvm,
694 struct ieee80211_vif *vif,
695 u32 link_id)
696 {
697 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
698 int ver = iwl_fw_lookup_cmd_ver(mvm->fw,
699 WIDE_ID(MAC_CONF_GROUP,
700 SESSION_PROTECTION_CMD), 1);
701
702 if (ver < 2)
703 return mvmvif->id;
704
> 705 if (WARN(link_id < 0 || !mvmvif->link[link_id],
706 "Invalid link ID for session protection: %u\n", link_id))
707 return -EINVAL;
708
709 if (WARN(ieee80211_vif_is_mld(vif) &&
710 !(vif->active_links & BIT(link_id)),
711 "Session Protection on an inactive link: %u\n", link_id))
712 return -EINVAL;
713
714 return mvmvif->link[link_id]->fw_link_id;
715 }
716
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-11-27 3:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 3:11 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-10 10:00 drivers/net/wireless/intel/iwlwifi/mvm/time-event.c:705 iwl_mvm_get_session_prot_id() warn: unsigned 'link_id' is never less than zero kernel test robot
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=202311270932.ewkH5ZT0-lkp@intel.com \
--to=lkp@intel.com \
--cc=gregory.greenman@intel.com \
--cc=johannes.berg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--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