[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202301240736.ApaNwujP-lkp@intel.com>
Date: Tue, 24 Jan 2023 07:38:11 +0800
From: kernel test robot <lkp@...el.com>
To: John Keeping <john@...anate.com>, netdev@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, John Keeping <john@...anate.com>,
Arend van Spriel <aspriel@...il.com>,
Franky Lin <franky.lin@...adcom.com>,
Hante Meuleman <hante.meuleman@...adcom.com>,
Kalle Valo <kvalo@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Alvin Šipraga <ALSI@...g-olufsen.dk>,
linux-wireless@...r.kernel.org,
brcm80211-dev-list.pdl@...adcom.com,
SHA-cyfmac-dev-list@...ineon.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] brcmfmac: support CQM RSSI notification with older
firmware
Hi John,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on wireless-next/main]
[also build test WARNING on wireless/main horms-ipvs/master linus/master v6.2-rc5 next-20230123]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/John-Keeping/brcmfmac-support-CQM-RSSI-notification-with-older-firmware/20230123-194055
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20230123113924.2472721-1-john%40metanate.com
patch subject: [PATCH] brcmfmac: support CQM RSSI notification with older firmware
config: sparc-randconfig-s051-20230123 (https://download.01.org/0day-ci/archive/20230124/202301240736.ApaNwujP-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/9e64c42d8517fca7356a698629cec1cdb79ce104
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review John-Keeping/brcmfmac-support-CQM-RSSI-notification-with-older-firmware/20230123-194055
git checkout 9e64c42d8517fca7356a698629cec1cdb79ce104
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash drivers/net/wireless/broadcom/brcm80211/brcmfmac/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:6500:24: sparse: sparse: cast to restricted __be32
vim +6500 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
6486
6487 static s32 brcmf_notify_rssi(struct brcmf_if *ifp,
6488 const struct brcmf_event_msg *e, void *data)
6489 {
6490 struct brcmf_cfg80211_vif *vif = ifp->vif;
6491 struct brcmf_rssi_be *info = data;
6492 s32 rssi, snr = 0, noise = 0;
6493 s32 low, high, last;
6494
6495 if (e->datalen >= sizeof(*info)) {
6496 rssi = be32_to_cpu(info->rssi);
6497 snr = be32_to_cpu(info->snr);
6498 noise = be32_to_cpu(info->noise);
6499 } else if (e->datalen >= sizeof(rssi)) {
> 6500 rssi = be32_to_cpu(*(s32 *)data);
6501 } else {
6502 brcmf_err("insufficient RSSI event data\n");
6503 return 0;
6504 }
6505
6506 low = vif->cqm_rssi_low;
6507 high = vif->cqm_rssi_high;
6508 last = vif->cqm_rssi_last;
6509
6510 brcmf_dbg(TRACE, "rssi=%d snr=%d noise=%d low=%d high=%d last=%d\n",
6511 rssi, snr, noise, low, high, last);
6512
6513 vif->cqm_rssi_last = rssi;
6514
6515 if (rssi <= low || rssi == 0) {
6516 brcmf_dbg(INFO, "LOW rssi=%d\n", rssi);
6517 cfg80211_cqm_rssi_notify(ifp->ndev,
6518 NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
6519 rssi, GFP_KERNEL);
6520 } else if (rssi > high) {
6521 brcmf_dbg(INFO, "HIGH rssi=%d\n", rssi);
6522 cfg80211_cqm_rssi_notify(ifp->ndev,
6523 NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
6524 rssi, GFP_KERNEL);
6525 }
6526
6527 return 0;
6528 }
6529
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
Powered by blists - more mailing lists