[staging:staging-testing 391/415] drivers/staging/wfx/sta.c:203:5: warning: no previous prototype for function 'wfx_get_ps_timeout'

kbuild test robot lkp at intel.com
Thu May 28 04:57:05 UTC 2020


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   36cf583eaff3458abbfac144c5e4d417a23fa1a1
commit: 398999dabc8cfc51c7274639cb87e2a316138859 [391/415] staging: wfx: split wfx_get_ps_timeout() from wfx_update_pm()
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git checkout 398999dabc8cfc51c7274639cb87e2a316138859
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/staging/wfx/sta.c:203:5: warning: no previous prototype for function 'wfx_get_ps_timeout' [-Wmissing-prototypes]
int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps)
^
drivers/staging/wfx/sta.c:203:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps)
^
static
>> drivers/staging/wfx/sta.c:233:5: warning: no previous prototype for function 'wfx_update_pm' [-Wmissing-prototypes]
int wfx_update_pm(struct wfx_vif *wvif)
^
drivers/staging/wfx/sta.c:233:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int wfx_update_pm(struct wfx_vif *wvif)
^
static
2 warnings generated.

vim +/wfx_get_ps_timeout +203 drivers/staging/wfx/sta.c

   202	
 > 203	int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps)
   204	{
   205		struct ieee80211_channel *chan0 = NULL, *chan1 = NULL;
   206		struct ieee80211_conf *conf = &wvif->wdev->hw->conf;
   207	
   208		WARN(!wvif->vif->bss_conf.assoc && enable_ps,
   209		     "enable_ps is reliable only if associated");
   210		if (wdev_to_wvif(wvif->wdev, 0))
   211			chan0 = wdev_to_wvif(wvif->wdev, 0)->vif->bss_conf.chandef.chan;
   212		if (wdev_to_wvif(wvif->wdev, 1))
   213			chan1 = wdev_to_wvif(wvif->wdev, 1)->vif->bss_conf.chandef.chan;
   214		if (chan0 && chan1 && chan0->hw_value != chan1->hw_value &&
   215		    wvif->vif->type != NL80211_IFTYPE_AP) {
   216			// It is necessary to enable powersave if channels
   217			// are differents.
   218			if (enable_ps)
   219				*enable_ps = true;
   220			if (wvif->bss_not_support_ps_poll)
   221				return 30;
   222			else
   223				return 0;
   224		}
   225		if (enable_ps)
   226			*enable_ps = wvif->vif->bss_conf.ps;
   227		if (wvif->vif->bss_conf.assoc && wvif->vif->bss_conf.ps)
   228			return conf->dynamic_ps_timeout;
   229		else
   230			return -1;
   231	}
   232	
 > 233	int wfx_update_pm(struct wfx_vif *wvif)
   234	{
   235		int ps_timeout;
   236		bool ps;
   237	
   238		if (!wvif->vif->bss_conf.assoc)
   239			return 0;
   240		ps_timeout = wfx_get_ps_timeout(wvif, &ps);
   241		if (!ps)
   242			ps_timeout = 0;
   243		WARN_ON(ps_timeout < 0);
   244		if (wvif->uapsd_mask)
   245			ps_timeout = 0;
   246	
   247		if (!wait_for_completion_timeout(&wvif->set_pm_mode_complete,
   248						 TU_TO_JIFFIES(512)))
   249			dev_warn(wvif->wdev->dev,
   250				 "timeout while waiting of set_pm_mode_complete\n");
   251		return hif_set_pm(wvif, ps, ps_timeout);
   252	}
   253	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 73591 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20200528/2545c307/attachment-0001.bin>


More information about the devel mailing list