All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: John Keeping <john@metanate.com>, netdev@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, "John Keeping" <john@metanate.com>,
	"Arend van Spriel" <aspriel@gmail.com>,
	"Franky Lin" <franky.lin@broadcom.com>,
	"Hante Meuleman" <hante.meuleman@broadcom.com>,
	"Kalle Valo" <kvalo@kernel.org>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Alvin Šipraga" <ALSI@bang-olufsen.dk>,
	linux-wireless@vger.kernel.org,
	brcm80211-dev-list.pdl@broadcom.com,
	SHA-cyfmac-dev-list@infineon.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] brcmfmac: support CQM RSSI notification with older firmware
Date: Tue, 24 Jan 2023 07:38:11 +0800	[thread overview]
Message-ID: <202301240736.ApaNwujP-lkp@intel.com> (raw)
In-Reply-To: <20230123113924.2472721-1-john@metanate.com>

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@intel.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

      reply	other threads:[~2023-01-23 23:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 11:39 [PATCH] brcmfmac: support CQM RSSI notification with older firmware John Keeping
2023-01-23 23:38 ` kernel test robot [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=202301240736.ApaNwujP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ALSI@bang-olufsen.dk \
    --cc=SHA-cyfmac-dev-list@infineon.com \
    --cc=aspriel@gmail.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=edumazet@google.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=john@metanate.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.