drivers/net/wireless/intel/ipw2x00/ipw2200.c:7151:21: warning: variable 'supported' set but not used

From: kernel test robot
Date: Sun Feb 05 2023 - 22:12:56 EST


Hi Stafford,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d2d11f342b179f1894a901f143ec7c008caba43e
commit: ded2ee36313c941f1a12b6f85cde295b575264ae openrisc: Add pci bus support
date: 6 months ago
config: openrisc-randconfig-r005-20230206 (https://download.01.org/0day-ci/archive/20230206/202302061152.0TfxrnEz-lkp@xxxxxxxxx/config)
compiler: or1k-linux-gcc (GCC) 12.1.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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ded2ee36313c941f1a12b6f85cde295b575264ae
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ded2ee36313c941f1a12b6f85cde295b575264ae
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=openrisc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=openrisc SHELL=/bin/bash drivers/net/wireless/intel/ipw2x00/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

drivers/net/wireless/intel/ipw2x00/ipw2200.c: In function 'ipw_fw_dma_dump_command_block':
drivers/net/wireless/intel/ipw2x00/ipw2200.c:2819:13: warning: variable 'register_value' set but not used [-Wunused-but-set-variable]
2819 | u32 register_value = 0;
| ^~~~~~~~~~~~~~
drivers/net/wireless/intel/ipw2x00/ipw2200.c: In function 'ipw_is_qos_active':
>> drivers/net/wireless/intel/ipw2x00/ipw2200.c:7151:21: warning: variable 'supported' set but not used [-Wunused-but-set-variable]
7151 | int active, supported;
| ^~~~~~~~~


vim +/supported +7151 drivers/net/wireless/intel/ipw2x00/ipw2200.c

43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 7145
a5cf4fe65144ff drivers/net/wireless/ipw2200.c Zhu Yi 2006-04-13 7146 static int ipw_is_qos_active(struct net_device *dev,
a5cf4fe65144ff drivers/net/wireless/ipw2200.c Zhu Yi 2006-04-13 7147 struct sk_buff *skb)
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 7148 {
b0a4e7d8a291de drivers/net/wireless/ipw2x00/ipw2200.c John W. Linville 2009-08-20 7149 struct ipw_priv *priv = libipw_priv(dev);
b0a4e7d8a291de drivers/net/wireless/ipw2x00/ipw2200.c John W. Linville 2009-08-20 7150 struct libipw_qos_data *qos_data = NULL;
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 @7151 int active, supported;
a5cf4fe65144ff drivers/net/wireless/ipw2200.c Zhu Yi 2006-04-13 7152 u8 *daddr = skb->data + ETH_ALEN;
a5cf4fe65144ff drivers/net/wireless/ipw2200.c Zhu Yi 2006-04-13 7153 int unicast = !is_multicast_ether_addr(daddr);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 7154
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7155 if (!(priv->status & STATUS_ASSOCIATED))
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7156 return 0;
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7157
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7158 qos_data = &priv->assoc_network->qos_data;
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7159
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7160 if (priv->ieee->iw_mode == IW_MODE_ADHOC) {
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7161 if (unicast == 0)
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7162 qos_data->active = 0;
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7163 else
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7164 qos_data->active = qos_data->supported;
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 7165 }
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7166 active = qos_data->active;
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7167 supported = qos_data->supported;
afbf30a2b78cac drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-25 7168 IPW_DEBUG_QOS("QoS %d network is QoS active %d supported %d "
afbf30a2b78cac drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-25 7169 "unicast %d\n",
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 7170 priv->qos_data.qos_enable, active, supported, unicast);
a5cf4fe65144ff drivers/net/wireless/ipw2200.c Zhu Yi 2006-04-13 7171 if (active && priv->qos_data.qos_enable)
a5cf4fe65144ff drivers/net/wireless/ipw2200.c Zhu Yi 2006-04-13 7172 return 1;
a5cf4fe65144ff drivers/net/wireless/ipw2200.c Zhu Yi 2006-04-13 7173
a5cf4fe65144ff drivers/net/wireless/ipw2200.c Zhu Yi 2006-04-13 7174 return 0;
a5cf4fe65144ff drivers/net/wireless/ipw2200.c Zhu Yi 2006-04-13 7175

:::::: The code at line 7151 was first introduced by commit
:::::: b095c3819805f87d73d41641a53e4c070360d783 Catch ipw2200 up to equivelancy with v1.0.4

:::::: TO: James Ketrenos <jketreno@xxxxxxxxxxxxxxx>
:::::: CC: James Ketrenos <jketreno@xxxxxxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests