mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/net/wireless/st/cw1200/txrx.c:766:15: sparse: struct ieee80211_sta __rcu COPYING CREDITS Documentation Kbuild Kconfig LICENSES MAINTAINERS Makefile README arch block certs crypto drivers fs include init ipc kernel lib mm net samples scripts security sound tools usr virt
@ 2020-06-24  7:41 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-06-24  7:41 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 10977 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3e08a95294a4fb3702bb3d35ed08028433c37fe6
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date:   6 days ago
config: x86_64-randconfig-s021-20200624 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-dirty
        git checkout 670d0a4b10704667765f7d18f7592993d02783aa
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

   drivers/net/wireless/st/cw1200/txrx.c:766:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> drivers/net/wireless/st/cw1200/txrx.c:766:15: sparse:    struct ieee80211_sta [noderef] __rcu *
   drivers/net/wireless/st/cw1200/txrx.c:766:15: sparse:    struct ieee80211_sta *
   drivers/net/wireless/st/cw1200/txrx.c:1149:32: sparse: sparse: cast to restricted __le64

vim +766 drivers/net/wireless/st/cw1200/txrx.c

a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  702  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  703  void cw1200_tx(struct ieee80211_hw *dev,
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  704  	       struct ieee80211_tx_control *control,
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  705  	       struct sk_buff *skb)
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  706  {
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  707  	struct cw1200_common *priv = dev->priv;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  708  	struct cw1200_txinfo t = {
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  709  		.skb = skb,
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  710  		.queue = skb_get_queue_mapping(skb),
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  711  		.tx_info = IEEE80211_SKB_CB(skb),
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  712  		.hdr = (struct ieee80211_hdr *)skb->data,
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  713  		.txpriv.tid = CW1200_MAX_TID,
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  714  		.txpriv.rate_id = CW1200_INVALID_RATE_ID,
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  715  	};
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  716  	struct ieee80211_sta *sta;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  717  	struct wsm_tx *wsm;
ab36bb72d00e24 drivers/net/wireless/st/cw1200/txrx.c zhengbin       2019-12-24  718  	bool tid_update = false;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  719  	u8 flags = 0;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  720  	int ret;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  721  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  722  	if (priv->bh_error)
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  723  		goto drop;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  724  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  725  	t.hdrlen = ieee80211_hdrlen(t.hdr->frame_control);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  726  	t.da = ieee80211_get_DA(t.hdr);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  727  	if (control) {
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  728  		t.sta = control->sta;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  729  		t.sta_priv = (struct cw1200_sta_priv *)&t.sta->drv_priv;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  730  	}
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  731  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  732  	if (WARN_ON(t.queue >= 4))
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  733  		goto drop;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  734  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  735  	ret = cw1200_tx_h_calc_link_ids(priv, &t);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  736  	if (ret)
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  737  		goto drop;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  738  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  739  	pr_debug("[TX] TX %d bytes (queue: %d, link_id: %d (%d)).\n",
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  740  		 skb->len, t.queue, t.txpriv.link_id,
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  741  		 t.txpriv.raw_link_id);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  742  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  743  	cw1200_tx_h_pm(priv, &t);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  744  	cw1200_tx_h_calc_tid(priv, &t);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  745  	ret = cw1200_tx_h_crypt(priv, &t);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  746  	if (ret)
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  747  		goto drop;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  748  	ret = cw1200_tx_h_align(priv, &t, &flags);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  749  	if (ret)
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  750  		goto drop;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  751  	ret = cw1200_tx_h_action(priv, &t);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  752  	if (ret)
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  753  		goto drop;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  754  	wsm = cw1200_tx_h_wsm(priv, &t);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  755  	if (!wsm) {
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  756  		ret = -ENOMEM;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  757  		goto drop;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  758  	}
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  759  	wsm->flags |= flags;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  760  	cw1200_tx_h_bt(priv, &t, wsm);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  761  	ret = cw1200_tx_h_rate_policy(priv, &t, wsm);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  762  	if (ret)
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  763  		goto drop;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  764  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  765  	rcu_read_lock();
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24 @766  	sta = rcu_dereference(t.sta);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  767  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  768  	spin_lock_bh(&priv->ps_state_lock);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  769  	{
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  770  		tid_update = cw1200_tx_h_pm_state(priv, &t);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  771  		BUG_ON(cw1200_queue_put(&priv->tx_queue[t.queue],
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  772  					t.skb, &t.txpriv));
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  773  	}
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  774  	spin_unlock_bh(&priv->ps_state_lock);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  775  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  776  	if (tid_update && sta)
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  777  		ieee80211_sta_set_buffered(sta, t.txpriv.tid, true);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  778  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  779  	rcu_read_unlock();
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  780  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  781  	cw1200_bh_wakeup(priv);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  782  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  783  	return;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  784  
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  785  drop:
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  786  	cw1200_skb_dtor(priv, skb, &t.txpriv);
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  787  	return;
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  788  }
a910e4a94f6923 drivers/net/wireless/cw1200/txrx.c    Solomon Peachy 2013-05-24  789  

:::::: The code at line 766 was first introduced by commit
:::::: a910e4a94f6923c8c988565525f017f687bf7205 cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets

:::::: TO: Solomon Peachy <pizza@shaftnet.org>
:::::: CC: John W. Linville <linville@tuxdriver.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36273 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-24  7:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24  7:41 drivers/net/wireless/st/cw1200/txrx.c:766:15: sparse: struct ieee80211_sta __rcu COPYING CREDITS Documentation Kbuild Kconfig LICENSES MAINTAINERS Makefile README arch block certs crypto drivers fs include init ipc kernel lib mm net samples scripts security sound tools usr virt kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®