[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202108111153.RP0tgn8w-lkp@intel.com>
Date: Wed, 11 Aug 2021 12:07:54 +0800
From: kernel test robot <lkp@...el.com>
To: JafarAkhondali <jafar.akhoondali@...il.com>,
Hans de Goede <hdegoede@...hat.com>, jlee@...e.com,
linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org,
mgross@...ux.intel.com
Cc: clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
JafarAkhondali <jafar.akhoondali@...il.com>
Subject: Re: [PATCH v4] platform/x86: acer-wmi: Add Turbo Mode support for
Acer PH315-53
Hi JafarAkhondali,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.14-rc5 next-20210810]
[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/JafarAkhondali/platform-x86-acer-wmi-Add-Turbo-Mode-support-for-Acer-PH315-53/20210811-074352
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9e723c5380c6e14fb91a8b6950563d040674afdb
config: x86_64-randconfig-c001-20210810 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d39ebdae674c8efc84ebe8dc32716ec353220530)
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/c3ff29407b252eec4ee917d22c3776858234f328
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review JafarAkhondali/platform-x86-acer-wmi-Add-Turbo-Mode-support-for-Acer-PH315-53/20210811-074352
git checkout c3ff29407b252eec4ee917d22c3776858234f328
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
>> drivers/platform/x86/acer-wmi.c:1715:4: warning: variable 'gpu_fan_config2' is uninitialized when used here [-Wuninitialized]
gpu_fan_config2 |= 1;
^~~~~~~~~~~~~~~
drivers/platform/x86/acer-wmi.c:1703:55: note: initialize the variable 'gpu_fan_config2' to silence this warning
u64 turbo_led_state, gpu_fan_config1, gpu_fan_config2;
^
= 0
>> drivers/platform/x86/acer-wmi.c:1721:4: warning: variable 'gpu_fan_config1' is uninitialized when used here [-Wuninitialized]
gpu_fan_config1 |= 1;
^~~~~~~~~~~~~~~
drivers/platform/x86/acer-wmi.c:1703:38: note: initialize the variable 'gpu_fan_config1' to silence this warning
u64 turbo_led_state, gpu_fan_config1, gpu_fan_config2;
^
= 0
2 warnings generated.
vim +/gpu_fan_config2 +1715 drivers/platform/x86/acer-wmi.c
1696
1697 /*
1698 * Predator series turbo button
1699 */
1700 static int acer_toggle_turbo(void)
1701 {
1702 /* Get current state from turbo button */
1703 u64 turbo_led_state, gpu_fan_config1, gpu_fan_config2;
1704 u8 i;
1705
1706 if (ACPI_FAILURE(WMID_gaming_get_u64(&turbo_led_state, ACER_CAP_TURBO_LED)))
1707 return -1;
1708
1709 if (turbo_led_state) {
1710 // turns off turbo led
1711 WMID_gaming_set_u64(0x1, ACER_CAP_TURBO_LED);
1712
1713 // set FAN mode to auto
1714 if (quirks->cpu_fans > 0)
> 1715 gpu_fan_config2 |= 1;
1716 for (i = 0; i < (quirks->cpu_fans + quirks->gpu_fans); ++i)
1717 gpu_fan_config2 |= 1 << (i + 1);
1718 for (i = 0; i < quirks->gpu_fans; ++i)
1719 gpu_fan_config2 |= 1 << (i + 3);
1720 if (quirks->cpu_fans > 0)
> 1721 gpu_fan_config1 |= 1;
1722 for (i = 0; i < (quirks->cpu_fans + quirks->gpu_fans); ++i)
1723 gpu_fan_config1 |= 1 << (2 * i + 2);
1724 for (i = 0; i < quirks->gpu_fans; ++i)
1725 gpu_fan_config1 |= 1 << (2 * i + 6);
1726 WMID_gaming_set_u64(gpu_fan_config2 | gpu_fan_config1 << 16, ACER_CAP_TURBO_FAN);
1727
1728 // set OC to normal
1729 WMID_gaming_set_u64(0x5, ACER_CAP_TURBO_OC);
1730 WMID_gaming_set_u64(0x7, ACER_CAP_TURBO_OC);
1731 } else {
1732 // turn on turbo led
1733 WMID_gaming_set_u64(0x10001, ACER_CAP_TURBO_LED);
1734
1735 // set FAN to turbo mode
1736 if (quirks->cpu_fans > 0)
1737 gpu_fan_config2 |= 1;
1738 for (i = 0; i < (quirks->cpu_fans + quirks->gpu_fans); ++i)
1739 gpu_fan_config2 |= 1 << (i + 1);
1740 for (i = 0; i < quirks->gpu_fans; ++i)
1741 gpu_fan_config2 |= 1 << (i + 3);
1742 if (quirks->cpu_fans > 0)
1743 gpu_fan_config1 |= 2;
1744 for (i = 0; i < (quirks->cpu_fans + quirks->gpu_fans); ++i)
1745 gpu_fan_config1 |= 2 << (2 * i + 2);
1746 for (i = 0; i < quirks->gpu_fans; ++i)
1747 gpu_fan_config1 |= 2 << (2 * i + 6);
1748 WMID_gaming_set_u64(gpu_fan_config2 | gpu_fan_config1 << 16, ACER_CAP_TURBO_FAN);
1749
1750 // set OC to turbo mode
1751 WMID_gaming_set_u64(0x205, ACER_CAP_TURBO_OC);
1752 WMID_gaming_set_u64(0x207, ACER_CAP_TURBO_OC);
1753 }
1754 return turbo_led_state;
1755 }
1756
---
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" (36357 bytes)
Powered by blists - more mailing lists