Hi "Rafael, I love your patch! Perhaps something to improve: [auto build test WARNING on rafael-pm/linux-next] [also build test WARNING on v5.15-rc3 next-20210921] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Rafael-J-Wysocki/ACPICA-Avoid-evaluating-methods-too-early-during-system-resume/20210929-094420 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next config: i386-randconfig-r011-20210929 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498) 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 # https://github.com/0day-ci/linux/commit/5fe36d7853aa294e5f0085e4b036a28fe97f25ea git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Rafael-J-Wysocki/ACPICA-Avoid-evaluating-methods-too-early-during-system-resume/20210929-094420 git checkout 5fe36d7853aa294e5f0085e4b036a28fe97f25ea # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 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/acpi/acpica/hwsleep.c:195:6: warning: variable 'status' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (acpi_gbl_sleep_type_a_s0 != ACPI_SLEEP_TYPE_INVALID) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/acpi/acpica/hwsleep.c:228:21: note: uninitialized use occurs here return_ACPI_STATUS(status); ^~~~~~ include/acpi/acoutput.h:457:48: note: expanded from macro 'return_ACPI_STATUS' #define return_ACPI_STATUS(s) return(s) ^ drivers/acpi/acpica/hwsleep.c:195:2: note: remove the 'if' if its condition is always true if (acpi_gbl_sleep_type_a_s0 != ACPI_SLEEP_TYPE_INVALID) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/acpi/acpica/hwsleep.c:182:20: note: initialize the variable 'status' to silence this warning acpi_status status; ^ = 0 1 warning generated. vim +195 drivers/acpi/acpica/hwsleep.c 165 166 /******************************************************************************* 167 * 168 * FUNCTION: acpi_hw_legacy_wake_prep 169 * 170 * PARAMETERS: sleep_state - Which sleep state we just exited 171 * 172 * RETURN: Status 173 * 174 * DESCRIPTION: Perform the first state of OS-independent ACPI cleanup after a 175 * sleep. 176 * Called with interrupts ENABLED. 177 * 178 ******************************************************************************/ 179 180 acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state) 181 { 182 acpi_status status; 183 struct acpi_bit_register_info *sleep_type_reg_info; 184 struct acpi_bit_register_info *sleep_enable_reg_info; 185 u32 pm1a_control; 186 u32 pm1b_control; 187 188 ACPI_FUNCTION_TRACE(hw_legacy_wake_prep); 189 190 /* 191 * Set SLP_TYPE and SLP_EN to state S0. 192 * This is unclear from the ACPI Spec, but it is required 193 * by some machines. 194 */ > 195 if (acpi_gbl_sleep_type_a_s0 != ACPI_SLEEP_TYPE_INVALID) { 196 sleep_type_reg_info = 197 acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_TYPE); 198 sleep_enable_reg_info = 199 acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_ENABLE); 200 201 /* Get current value of PM1A control */ 202 203 status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL, 204 &pm1a_control); 205 if (ACPI_SUCCESS(status)) { 206 207 /* Clear the SLP_EN and SLP_TYP fields */ 208 209 pm1a_control &= ~(sleep_type_reg_info->access_bit_mask | 210 sleep_enable_reg_info-> 211 access_bit_mask); 212 pm1b_control = pm1a_control; 213 214 /* Insert the SLP_TYP bits */ 215 216 pm1a_control |= (acpi_gbl_sleep_type_a_s0 << 217 sleep_type_reg_info->bit_position); 218 pm1b_control |= (acpi_gbl_sleep_type_b_s0 << 219 sleep_type_reg_info->bit_position); 220 221 /* Write the control registers and ignore any errors */ 222 223 (void)acpi_hw_write_pm1_control(pm1a_control, 224 pm1b_control); 225 } 226 } 227 228 return_ACPI_STATUS(status); 229 } 230 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip