[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202006180037.otStdm1o%lkp@intel.com>
Date: Thu, 18 Jun 2020 00:37:41 +0800
From: kernel test robot <lkp@...el.com>
To: Jonathan Kim <jonathan.kim@....com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Alex Deucher <alexander.deucher@....com>,
Felix Kuehling <Felix.Kuehling@....com>
Subject: drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:249:6: warning: variable
'ret' set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: 9c7c85f7ea1fe55e9406858e3ca32a51494bd02e drm/amdgpu: add pmu counters
date: 12 months ago
config: arc-randconfig-r036-20200617 (attached as .config)
compiler: arc-elf-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 9c7c85f7ea1fe55e9406858e3ca32a51494bd02e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c: In function 'amdgpu_pmu_init':
>> drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:249:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
249 | int ret = 0;
| ^~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:53,
from drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:28:
At top level:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
| ^~~~~~~~~~~~~
In file included from include/linux/perf_event.h:25,
from drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:26:
arch/arc/include/asm/perf_event.h:130:23: warning: 'arc_pmu_cache_map' defined but not used [-Wunused-const-variable=]
130 | static const unsigned arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/perf_event.h:95:27: warning: 'arc_pmu_ev_hw_map' defined but not used [-Wunused-const-variable=]
95 | static const char * const arc_pmu_ev_hw_map[] = {
| ^~~~~~~~~~~~~~~~~
vim +/ret +249 drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c
245
246 /* init amdgpu_pmu */
247 int amdgpu_pmu_init(struct amdgpu_device *adev)
248 {
> 249 int ret = 0;
250
251 switch (adev->asic_type) {
252 case CHIP_VEGA20:
253 /* init df */
254 ret = init_pmu_by_type(adev, df_v3_6_attr_groups,
255 "DF", "amdgpu_df", PERF_TYPE_AMDGPU_DF,
256 DF_V3_6_MAX_COUNTERS);
257
258 /* other pmu types go here*/
259 break;
260 default:
261 return 0;
262 }
263
264 return 0;
265 }
266
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (24529 bytes)
Powered by blists - more mailing lists