[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202006180619.ytjCyrZR%lkp@intel.com>
Date: Thu, 18 Jun 2020 06:16:22 +0800
From: kernel test robot <lkp@...el.com>
To: Kevin Wang <kevin1.wang@....com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Alex Deucher <alexander.deucher@....com>,
Huang Rui <ray.huang@....com>
Subject: drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:801:6: warning:
variable 'ret' set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1b5044021070efa3259f3e9548dc35d1eb6aa844
commit: 4228b6015d659c63cd8e4f24fc1db3a0c23e56a1 drm/amd/powerplay: add function is_dpm_running for navi10
date: 12 months ago
config: ia64-randconfig-r012-20200617 (attached as .config)
compiler: ia64-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 4228b6015d659c63cd8e4f24fc1db3a0c23e56a1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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/../powerplay/navi10_ppt.c: In function 'navi10_is_dpm_running':
>> drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:801:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
801 | int ret = 0;
| ^~~
drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c: At top level:
drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:834:34: error: initialization of 'int (*)(struct smu_context *, enum amd_pp_sensors, uint32_t *)' {aka 'int (*)(struct smu_context *, enum amd_pp_sensors, unsigned int *)'} from incompatible pointer type 'int (*)(struct smu_context *, uint32_t *)' {aka 'int (*)(struct smu_context *, unsigned int *)'} [-Werror=incompatible-pointer-types]
834 | .get_current_activity_percent = navi10_get_current_activity_percent,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:834:34: note: (near initialization for 'navi10_ppt_funcs.get_current_activity_percent')
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/amdgpu.h:53,
from drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:26:
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 };
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/ret +801 drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c
798
799 static bool navi10_is_dpm_running(struct smu_context *smu)
800 {
> 801 int ret = 0;
802 uint32_t feature_mask[2];
803 unsigned long feature_enabled;
804 ret = smu_feature_get_enabled_mask(smu, feature_mask, 2);
805 feature_enabled = (unsigned long)((uint64_t)feature_mask[0] |
806 ((uint64_t)feature_mask[1] << 32));
807 return !!(feature_enabled & SMC_DPM_FEATURE);
808 }
809
---
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" (27664 bytes)
Powered by blists - more mailing lists