[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210250453.2csXEcpX-lkp@intel.com>
Date: Tue, 25 Oct 2022 05:04:12 +0800
From: kernel test robot <lkp@...el.com>
To: Huacai Chen <chenhuacai@...ngson.cn>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
WANG Xuerui <git@...0n.name>,
Jianmin Lv <lvjianmin@...ngson.cn>
Subject: drivers/net/wireless/intel/ipw2x00/ipw2200.c:2819:13: warning:
variable 'register_value' set but not used
Hi Huacai,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 337a0a0b63f1c30195733eaacf39e4310a592a68
commit: 57fc7323a8e7c2e7c1d5795ab63cb3ffea3cfdfb LoongArch: Add PCI controller support
date: 2 months ago
config: loongarch-randconfig-r023-20221025
compiler: loongarch64-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=57fc7323a8e7c2e7c1d5795ab63cb3ffea3cfdfb
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 57fc7323a8e7c2e7c1d5795ab63cb3ffea3cfdfb
# 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=loongarch 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@...el.com>
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;
| ^~~~~~~~~~~~~~
vim +/register_value +2819 drivers/net/wireless/intel/ipw2x00/ipw2200.c
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2815
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2816 static void ipw_fw_dma_dump_command_block(struct ipw_priv *priv)
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2817 {
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2818 u32 address;
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 @2819 u32 register_value = 0;
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2820 u32 cb_fields_address = 0;
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2821
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2822 IPW_DEBUG_FW(">> :\n");
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 2823 address = ipw_read_reg32(priv, IPW_DMA_I_CURRENT_CB);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2824 IPW_DEBUG_FW_INFO("Current CB is 0x%x\n", address);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2825
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2826 /* Read the DMA Controlor register */
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 2827 register_value = ipw_read_reg32(priv, IPW_DMA_I_DMA_CONTROL);
b095c3819805f8 drivers/net/wireless/ipw2200.c James Ketrenos 2005-08-24 2828 IPW_DEBUG_FW_INFO("IPW_DMA_I_DMA_CONTROL is 0x%x\n", register_value);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2829
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2830 /* Print the CB values */
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2831 cb_fields_address = address;
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2832 register_value = ipw_read_reg32(priv, cb_fields_address);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2833 IPW_DEBUG_FW_INFO("Current CB Control Field is 0x%x\n", register_value);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2834
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2835 cb_fields_address += sizeof(u32);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2836 register_value = ipw_read_reg32(priv, cb_fields_address);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2837 IPW_DEBUG_FW_INFO("Current CB Source Field is 0x%x\n", register_value);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2838
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2839 cb_fields_address += sizeof(u32);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2840 register_value = ipw_read_reg32(priv, cb_fields_address);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2841 IPW_DEBUG_FW_INFO("Current CB Destination Field is 0x%x\n",
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2842 register_value);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2843
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2844 cb_fields_address += sizeof(u32);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2845 register_value = ipw_read_reg32(priv, cb_fields_address);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2846 IPW_DEBUG_FW_INFO("Current CB Status Field is 0x%x\n", register_value);
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2847
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2848 IPW_DEBUG_FW(">> :\n");
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2849 }
43f66a6ce8da29 drivers/net/wireless/ipw2200.c James Ketrenos 2005-03-25 2850
:::::: The code at line 2819 was first introduced by commit
:::::: 43f66a6ce8da299344cf1bc2ac2311889cc88555 Add ipw2200 wireless driver.
:::::: TO: James Ketrenos <jketreno@...ux.intel.com>
:::::: CC: Jeff Garzik <jgarzik@...ox.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (156849 bytes)
Powered by blists - more mailing lists