Skip to contentSkip to conversation

drivers/platform/x86/thinkpad_acpi.c:10538 dytc_profile_refresh() error: uninitialized symbol 'funcmode'.

DISCUSSION kernel test robot 1 participant 1 message Jun 1, 2023

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw

BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Mark Pearson <[email protected]>
CC: Hans de Goede <[email protected]>
CC: Mario Limonciello <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   929ed21dfdb6ee94391db51c9eedb63314ef6847
commit: 1bc5d819f0b9784043ea08570e1b21107aa35739 platform/x86: thinkpad_acpi: Fix profile modes on Intel platforms
date:   4 months ago

:::::: branch date: 5 hours ago
:::::: commit date: 4 months ago
config: i386-randconfig-m021-20230531 (https://download.01.org/0day-ci/archive/20230601/[email protected]/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

If you fix the issue, kindly add following tag where applicable

| Reported-by: kernel test robot <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

New smatch warnings:
drivers/platform/x86/thinkpad_acpi.c:10538 dytc_profile_refresh() error: uninitialized symbol 'funcmode'.

Old smatch warnings:
drivers/platform/x86/thinkpad_acpi.c:1193 tpacpi_new_rfkill() warn: 'atp_rfk->rfkill' is an error pointer or valid drivers/platform/x86/thinkpad_acpi.c:2606 hotkey_inputdev_close() warn: bitwise AND condition is false here drivers/platform/x86/thinkpad_acpi.c:3776 hotkey_notify_hotkey() warn: bitwise AND condition is false here drivers/platform/x86/thinkpad_acpi.c:10531 dytc_profile_refresh() error: uninitialized symbol 'output'. drivers/platform/x86/thinkpad_acpi.c:10537 dytc_profile_refresh() error: uninitialized symbol 'output'.

vim +/funcmode +10538 drivers/platform/x86/thinkpad_acpi.c

c3bfcd4c676238 Mark Pearson  2021-01-11  10514  
c3bfcd4c676238 Mark Pearson  2021-01-11  10515  static void dytc_profile_refresh(void)
c3bfcd4c676238 Mark Pearson  2021-01-11  10516  {
c3bfcd4c676238 Mark Pearson  2021-01-11  10517  	enum platform_profile_option profile;
6229ce9c36384c Hans de Goede 2022-03-09  10518  	int output, err = 0;
fde5f74ccfc771 Mark Pearson  2023-01-12  10519  	int perfmode, funcmode;
c3bfcd4c676238 Mark Pearson  2021-01-11  10520  
c3bfcd4c676238 Mark Pearson  2021-01-11  10521  	mutex_lock(&dytc_mutex);
42504af775361c Mark Pearson  2022-06-03  10522  	if (dytc_capabilities & BIT(DYTC_FC_MMC)) {
7a47f86bba748b Mark Pearson  2021-04-06  10523  		if (dytc_mmc_get_available)
7a47f86bba748b Mark Pearson  2021-04-06  10524  			err = dytc_command(DYTC_CMD_MMC_GET, &output);
7a47f86bba748b Mark Pearson  2021-04-06  10525  		else
c3bfcd4c676238 Mark Pearson  2021-01-11  10526  			err = dytc_cql_command(DYTC_CMD_GET, &output);
1bc5d819f0b978 Mark Pearson  2023-01-24  10527  		funcmode = DYTC_FUNCTION_MMC;
1bc5d819f0b978 Mark Pearson  2023-01-24  10528  	} else if (dytc_capabilities & BIT(DYTC_FC_PSC)) {
e1c21608e3cfc4 Mark Pearson  2022-02-25  10529  		err = dytc_command(DYTC_CMD_GET, &output);
1bc5d819f0b978 Mark Pearson  2023-01-24  10530  		/* Check if we are PSC mode, or have AMT enabled */
1bc5d819f0b978 Mark Pearson  2023-01-24  10531  		funcmode = (output >> DYTC_GET_FUNCTION_BIT) & 0xF;
1bc5d819f0b978 Mark Pearson  2023-01-24  10532  	}
c3bfcd4c676238 Mark Pearson  2021-01-11  10533  	mutex_unlock(&dytc_mutex);
c3bfcd4c676238 Mark Pearson  2021-01-11  10534  	if (err)
c3bfcd4c676238 Mark Pearson  2021-01-11  10535  		return;
c3bfcd4c676238 Mark Pearson  2021-01-11  10536  
c3bfcd4c676238 Mark Pearson  2021-01-11  10537  	perfmode = (output >> DYTC_GET_MODE_BIT) & 0xF;
fde5f74ccfc771 Mark Pearson  2023-01-12 @10538  	convert_dytc_to_profile(funcmode, perfmode, &profile);
c3bfcd4c676238 Mark Pearson  2021-01-11  10539  	if (profile != dytc_current_profile) {
c3bfcd4c676238 Mark Pearson  2021-01-11  10540  		dytc_current_profile = profile;
c3bfcd4c676238 Mark Pearson  2021-01-11  10541  		platform_profile_notify();
c3bfcd4c676238 Mark Pearson  2021-01-11  10542  	}
c3bfcd4c676238 Mark Pearson  2021-01-11  10543  }
c3bfcd4c676238 Mark Pearson  2021-01-11  10544  

:::::: The code at line 10538 was first introduced by commit
:::::: fde5f74ccfc771941b018b5415fa9664426e10ad platform/x86: thinkpad_acpi: Fix profile mode display in AMT mode

:::::: TO: Mark Pearson <[email protected]> :::::: CC: Hans de Goede <[email protected]>

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki