All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 1189/13554] drivers/staging/wfx/data_tx.c:45:9: warning: variable 'count' set but not used
@ 2020-05-29  1:45 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-29  1:45 UTC (permalink / raw)
  To: kbuild-all

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

Hi Jérôme,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ff387fc20c697cdc887b2abf7ef494e853795a2f
commit: 3f84adfe1d7ae9c72f02a4f28d3381c678878a3d [1189/13554] staging: wfx: remove hack about tx_rate policies
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
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
        git checkout 3f84adfe1d7ae9c72f02a4f28d3381c678878a3d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv 

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

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

drivers/staging/wfx/data_tx.c: In function 'wfx_tx_policy_build':
>> drivers/staging/wfx/data_tx.c:45:9: warning: variable 'count' set but not used [-Wunused-but-set-variable]
45 |  size_t count;
|         ^~~~~

vim +/count +45 drivers/staging/wfx/data_tx.c

9bca45f3d6924f Jérôme Pouiller 2019-09-19  40  
fcd6c0f9a12369 Jérôme Pouiller 2019-10-08  41  static void wfx_tx_policy_build(struct wfx_vif *wvif, struct tx_policy *policy,
9bca45f3d6924f Jérôme Pouiller 2019-09-19  42  				struct ieee80211_tx_rate *rates)
9bca45f3d6924f Jérôme Pouiller 2019-09-19  43  {
9bca45f3d6924f Jérôme Pouiller 2019-09-19  44  	int i;
9bca45f3d6924f Jérôme Pouiller 2019-09-19 @45  	size_t count;
9bca45f3d6924f Jérôme Pouiller 2019-09-19  46  	struct wfx_dev *wdev = wvif->wdev;
9bca45f3d6924f Jérôme Pouiller 2019-09-19  47  
b5be2aa3b3ac15 Jérôme Pouiller 2019-10-08  48  	WARN(rates[0].idx < 0, "invalid rate policy");
9bca45f3d6924f Jérôme Pouiller 2019-09-19  49  	memset(policy, 0, sizeof(*policy));
9bca45f3d6924f Jérôme Pouiller 2019-09-19  50  	for (i = 1; i < IEEE80211_TX_MAX_RATES; i++)
9bca45f3d6924f Jérôme Pouiller 2019-09-19  51  		if (rates[i].idx < 0)
9bca45f3d6924f Jérôme Pouiller 2019-09-19  52  			break;
9bca45f3d6924f Jérôme Pouiller 2019-09-19  53  	count = i;
9bca45f3d6924f Jérôme Pouiller 2019-09-19  54  	for (i = 0; i < IEEE80211_TX_MAX_RATES; ++i) {
9bca45f3d6924f Jérôme Pouiller 2019-09-19  55  		int rateid;
5cd382b2693358 Jules Irenge    2019-11-11  56  		u8 count;
9bca45f3d6924f Jérôme Pouiller 2019-09-19  57  
9bca45f3d6924f Jérôme Pouiller 2019-09-19  58  		if (rates[i].idx < 0)
9bca45f3d6924f Jérôme Pouiller 2019-09-19  59  			break;
9bca45f3d6924f Jérôme Pouiller 2019-09-19  60  		WARN_ON(rates[i].count > 15);
9bca45f3d6924f Jérôme Pouiller 2019-09-19  61  		rateid = wfx_get_hw_rate(wdev, &rates[i]);
9bca45f3d6924f Jérôme Pouiller 2019-09-19  62  		// Pack two values in each byte of policy->rates
9bca45f3d6924f Jérôme Pouiller 2019-09-19  63  		count = rates[i].count;
9bca45f3d6924f Jérôme Pouiller 2019-09-19  64  		if (rateid % 2)
9bca45f3d6924f Jérôme Pouiller 2019-09-19  65  			count <<= 4;
9bca45f3d6924f Jérôme Pouiller 2019-09-19  66  		policy->rates[rateid / 2] |= count;
9bca45f3d6924f Jérôme Pouiller 2019-09-19  67  	}
9bca45f3d6924f Jérôme Pouiller 2019-09-19  68  }
9bca45f3d6924f Jérôme Pouiller 2019-09-19  69  

:::::: The code at line 45 was first introduced by commit
:::::: 9bca45f3d6924f19f29c0d019e961af3f41bdc9e staging: wfx: allow to send 802.11 frames

:::::: TO: Jérôme Pouiller <jerome.pouiller@silabs.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

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

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

only message in thread, other threads:[~2020-05-29  1:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29  1:45 [linux-next:master 1189/13554] drivers/staging/wfx/data_tx.c:45:9: warning: variable 'count' set but not used kbuild test robot

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.