tree:
https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head: ebeff894af6654fef910e5b6da4f515aa7c73583
commit: de4b7cd8cb87c12559e0545d9c9c631cb2e8ee6f [17/61] drm/amd/pm/swsmu: unify the init
soft gpu metrics function
config: riscv-randconfig-r012-20210209 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
c9439ca36342fb6013187d0a69aef92736951476)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
git remote add agd5f
https://gitlab.freedesktop.org/agd5f/linux.git
git fetch --no-tags agd5f drm-next
git checkout de4b7cd8cb87c12559e0545d9c9c631cb2e8ee6f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:764:2: warning:
variable 'structure_size' is used uninitialized whenever switch default is taken
[-Wsometimes-uninitialized]
default:
^~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:770:23: note: uninitialized use occurs
here
memset(header, 0xFF, structure_size);
^~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:753:25: note: initialize the variable
'structure_size' to silence this warning
uint16_t structure_size;
^
= 0
1 warning generated.
vim +/structure_size +764 drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c
756
757 switch (METRICS_VERSION(frev, crev)) {
758 case METRICS_VERSION(1, 0):
759 structure_size = sizeof(struct gpu_metrics_v1_0);
760 break;
761 case METRICS_VERSION(2, 0):
762 structure_size = sizeof(struct gpu_metrics_v2_0);
763 break;
764 default:
765 break;
766 }
767
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org