[agd5f:drm-next 56/91] drivers/gpu/drm/amd/amdgpu/umc_v8_7.c:97:11: warning: variable 'umc_reg_offset' set but not used
From: kernel test robot
Date: Tue Jan 18 2022 - 23:12:24 EST
tree: https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head: e23fcf632883babbea03fc27f7993e151969b652
commit: c34242eea16f7d973501267142dd340cad3caeec [56/91] drm/amdgpu: add new query interface for umc_v8_7 block
config: i386-randconfig-a001-20220117 (https://download.01.org/0day-ci/archive/20220119/202201191214.xx7M9Hem-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f7b7138a62648f4019c55e4671682af1f851f295)
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 remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
git fetch --no-tags agd5f drm-next
git checkout c34242eea16f7d973501267142dd340cad3caeec
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/umc_v8_7.c:97:11: warning: variable 'umc_reg_offset' set but not used [-Wunused-but-set-variable]
uint32_t umc_reg_offset = 0;
^
1 warning generated.
vim +/umc_reg_offset +97 drivers/gpu/drm/amd/amdgpu/umc_v8_7.c
89
90 static void umc_v8_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev,
91 void *ras_error_status)
92 {
93 struct ras_err_data *err_data = (struct ras_err_data *)ras_error_status;
94
95 uint32_t umc_inst = 0;
96 uint32_t ch_inst = 0;
> 97 uint32_t umc_reg_offset = 0;
98 uint32_t channel_index = 0;
99
100 /* TODO: driver needs to toggle DF Cstate to ensure
101 * safe access of UMC registers. Will add the protection
102 */
103 LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) {
104 umc_reg_offset = get_umc_v8_7_reg_offset(adev,
105 umc_inst,
106 ch_inst);
107 channel_index = get_umc_v8_7_channel_index(adev,
108 umc_inst,
109 ch_inst);
110 umc_v8_7_ecc_info_query_correctable_error_count(adev,
111 channel_index,
112 &(err_data->ce_count));
113 umc_v8_7_ecc_info_querry_uncorrectable_error_count(adev,
114 channel_index,
115 &(err_data->ue_count));
116 }
117 }
118
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx