All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: JafarAkhondali <jafar.akhoondali@gmail.com>,
	Hans de Goede <hdegoede@redhat.com>,
	jlee@suse.com, linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org, mgross@linux.intel.com
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	JafarAkhondali <jafar.akhoondali@gmail.com>
Subject: Re: [PATCH v4] platform/x86: acer-wmi: Add Turbo Mode support for Acer PH315-53
Date: Wed, 11 Aug 2021 12:07:54 +0800	[thread overview]
Message-ID: <202108111153.RP0tgn8w-lkp@intel.com> (raw)
In-Reply-To: <20210810233928.1389320-1-jafar.akhoondali@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5162 bytes --]

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@intel.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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36357 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v4] platform/x86: acer-wmi: Add Turbo Mode support for Acer PH315-53
Date: Wed, 11 Aug 2021 12:07:54 +0800	[thread overview]
Message-ID: <202108111153.RP0tgn8w-lkp@intel.com> (raw)
In-Reply-To: <20210810233928.1389320-1-jafar.akhoondali@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5275 bytes --]

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@intel.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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36357 bytes --]

  reply	other threads:[~2021-08-11  4:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10 23:39 [PATCH v4] platform/x86: acer-wmi: Add Turbo Mode support for Acer PH315-53 JafarAkhondali
2021-08-11  4:07 ` kernel test robot [this message]
2021-08-11  4:07   ` kernel test robot
2021-08-12  7:59 ` Hans de Goede
2021-08-12 12:01   ` Jafar Akhondali

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=202108111153.RP0tgn8w-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=hdegoede@redhat.com \
    --cc=jafar.akhoondali@gmail.com \
    --cc=jlee@suse.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.