CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: JafarAkhondali <[email protected]>
TO: Hans de Goede <[email protected]>
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
CC: JafarAkhondali <[email protected]>

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-20210812]
[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/20210812-212347
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
1746f4db513563bb22e0ba0c419d0c90912dfae1
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
config: x86_64-randconfig-m001-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

New smatch warnings:
drivers/platform/x86/acer-wmi.c:1475 WMID_gaming_set_fan_mode() warn: should '1 
<< (i + 1)' be a 64 bit type?
drivers/platform/x86/acer-wmi.c:1481 WMID_gaming_set_fan_mode() warn: should 
'fan_mode << (2 * i + 2)' be a 64 bit type?

Old smatch warnings:
drivers/platform/x86/acer-wmi.c:1477 WMID_gaming_set_fan_mode() warn: should '1 
<< (i + 3)' be a 64 bit type?
drivers/platform/x86/acer-wmi.c:1483 WMID_gaming_set_fan_mode() warn: should 
'fan_mode << (2 * i + 6)' be a 64 bit type?

vim +1475 drivers/platform/x86/acer-wmi.c

292cfa3c9af2eb JafarAkhondali 2021-08-12  1465  
292cfa3c9af2eb JafarAkhondali 2021-08-12  1466  void 
WMID_gaming_set_fan_mode(u8 fan_mode)
292cfa3c9af2eb JafarAkhondali 2021-08-12  1467  {
292cfa3c9af2eb JafarAkhondali 2021-08-12  1468          /* fan_mode = 1 is used 
for auto, fan_mode = 2 used for turbo*/
292cfa3c9af2eb JafarAkhondali 2021-08-12  1469          u64 gpu_fan_config1 = 
0, gpu_fan_config2 = 0;
292cfa3c9af2eb JafarAkhondali 2021-08-12  1470          int i;
292cfa3c9af2eb JafarAkhondali 2021-08-12  1471  
292cfa3c9af2eb JafarAkhondali 2021-08-12  1472          if (quirks->cpu_fans > 
0)
292cfa3c9af2eb JafarAkhondali 2021-08-12  1473                  gpu_fan_config2 
|= 1;
292cfa3c9af2eb JafarAkhondali 2021-08-12  1474          for (i = 0; i < 
(quirks->cpu_fans + quirks->gpu_fans); ++i)
292cfa3c9af2eb JafarAkhondali 2021-08-12 @1475                  gpu_fan_config2 
|= 1 << (i + 1);
292cfa3c9af2eb JafarAkhondali 2021-08-12  1476          for (i = 0; i < 
quirks->gpu_fans; ++i)
292cfa3c9af2eb JafarAkhondali 2021-08-12  1477                  gpu_fan_config2 
|= 1 << (i + 3);
292cfa3c9af2eb JafarAkhondali 2021-08-12  1478          if (quirks->cpu_fans > 
0)
292cfa3c9af2eb JafarAkhondali 2021-08-12  1479                  gpu_fan_config1 
|= fan_mode;
292cfa3c9af2eb JafarAkhondali 2021-08-12  1480          for (i = 0; i < 
(quirks->cpu_fans + quirks->gpu_fans); ++i)
292cfa3c9af2eb JafarAkhondali 2021-08-12 @1481                  gpu_fan_config1 
|= fan_mode << (2 * i + 2);
292cfa3c9af2eb JafarAkhondali 2021-08-12  1482          for (i = 0; i < 
quirks->gpu_fans; ++i)
292cfa3c9af2eb JafarAkhondali 2021-08-12  1483                  gpu_fan_config1 
|= fan_mode << (2 * i + 6);
292cfa3c9af2eb JafarAkhondali 2021-08-12  1484          
WMID_gaming_set_u64(gpu_fan_config2 | gpu_fan_config1 << 16, 
ACER_CAP_TURBO_FAN);
292cfa3c9af2eb JafarAkhondali 2021-08-12  1485  }
292cfa3c9af2eb JafarAkhondali 2021-08-12  1486  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to