From: kernel test robot <lkp@intel.com>
To: Lijo Lazar <lijo.lazar@amd.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Alex Deucher <alexander.deucher@amd.com>,
Hawking Zhang <Hawking.Zhang@amd.com>
Subject: [linux-next:master 1761/1915] drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_6_ppt.c:1152:34: warning: variable 'software_shutdown_temp' is uninitialized when used here
Date: Wed, 8 Mar 2023 16:50:12 +0800 [thread overview]
Message-ID: <202303081657.6Ble80UY-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fc31900c948610e7b5c2f15fb7795832c8325327
commit: 511a95552ec878fc59a294652ebbf73a0e8e0c76 [1761/1915] drm/amd/pm: Add SMU 13.0.6 support
config: riscv-randconfig-r042-20230306 (https://download.01.org/0day-ci/archive/20230308/202303081657.6Ble80UY-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=511a95552ec878fc59a294652ebbf73a0e8e0c76
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 511a95552ec878fc59a294652ebbf73a0e8e0c76
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/gpu/drm/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303081657.6Ble80UY-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_6_ppt.c:1146:3: warning: variable 'hotspotlimit' is uninitialized when used here [-Wuninitialized]
hotspotlimit * SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_6_ppt.c:1135:22: note: initialize the variable 'hotspotlimit' to silence this warning
uint8_t hotspotlimit;
^
= '\0'
>> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_6_ppt.c:1149:24: warning: variable 'memlimit' is uninitialized when used here [-Wuninitialized]
range->mem_crit_max = memlimit * SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_6_ppt.c:1136:18: note: initialize the variable 'memlimit' to silence this warning
uint8_t memlimit;
^
= '\0'
>> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_6_ppt.c:1152:34: warning: variable 'software_shutdown_temp' is uninitialized when used here [-Wuninitialized]
range->software_shutdown_temp = software_shutdown_temp;
^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_6_ppt.c:1134:32: note: initialize the variable 'software_shutdown_temp' to silence this warning
uint8_t software_shutdown_temp;
^
= '\0'
3 warnings generated.
vim +/software_shutdown_temp +1152 drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_6_ppt.c
1129
1130 static int
1131 smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu,
1132 struct smu_temperature_range *range)
1133 {
1134 uint8_t software_shutdown_temp;
1135 uint8_t hotspotlimit;
1136 uint8_t memlimit;
1137
1138 if (!range)
1139 return -EINVAL;
1140
1141 /* TODO: Find a way to get temperature limits */
1142 memcpy(range, &smu_v13_0_6_thermal_policy[0],
1143 sizeof(struct smu_temperature_range));
1144
1145 range->hotspot_crit_max =
> 1146 hotspotlimit * SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
1147 range->hotspot_emergency_max = (hotspotlimit + CTF_OFFSET_HOTSPOT) *
1148 SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
> 1149 range->mem_crit_max = memlimit * SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
1150 range->mem_emergency_max = (memlimit + CTF_OFFSET_MEM) *
1151 SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
> 1152 range->software_shutdown_temp = software_shutdown_temp;
1153
1154 return 0;
1155 }
1156
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-03-08 8:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202303081657.6Ble80UY-lkp@intel.com \
--to=lkp@intel.com \
--cc=Hawking.Zhang@amd.com \
--cc=alexander.deucher@amd.com \
--cc=lijo.lazar@amd.com \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox