From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3076284458213178561==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [chrome-os:chromeos-5.10 9996/9999] drivers/cpufreq/intel_pstate.c:1484:6: warning: no previous prototype for function 'notify_hwp_interrupt' Date: Tue, 28 Dec 2021 21:28:36 +0800 Message-ID: <202112282102.XSjvgHch-lkp@intel.com> List-Id: --===============3076284458213178561== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chr= omeos-5.10 head: 2e5244bd3ec10b256c6f03bf2a33dd5a277df6f4 commit: 121d08a011e0315614d6f9018585815c5fab305c [9996/9999] UPSTREAM: cpuf= req: intel_pstate: Process HWP Guaranteed change notification config: x86_64-randconfig-a013-20211228 (https://download.01.org/0day-ci/ar= chive/20211228/202112282102.XSjvgHch-lkp(a)intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 7171af= 744543433ac75b232eb7dfdaef7efd4d7a) reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git remote add chrome-os https://chromium.googlesource.com/chromium= os/third_party/kernel git fetch --no-tags chrome-os chromeos-5.10 git checkout 121d08a011e0315614d6f9018585815c5fab305c # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W=3D= 1 O=3Dbuild_dir ARCH=3Dx86_64 SHELL=3D/bin/bash drivers/cpufreq/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/cpufreq/intel_pstate.c:1484:6: warning: no previous prototype fo= r function 'notify_hwp_interrupt' [-Wmissing-prototypes] void notify_hwp_interrupt(void) ^ drivers/cpufreq/intel_pstate.c:1484:1: note: declare 'static' if the fun= ction is not intended to be used outside of this translation unit void notify_hwp_interrupt(void) ^ static = drivers/cpufreq/intel_pstate.c:80:23: warning: unused function 'percent_= fp' [-Wunused-function] static inline int32_t percent_fp(int percent) ^ drivers/cpufreq/intel_pstate.c:95:23: warning: unused function 'percent_= ext_fp' [-Wunused-function] static inline int32_t percent_ext_fp(int percent) ^ 3 warnings generated. vim +/notify_hwp_interrupt +1484 drivers/cpufreq/intel_pstate.c 1483 = > 1484 void notify_hwp_interrupt(void) 1485 { 1486 unsigned int this_cpu =3D smp_processor_id(); 1487 struct cpudata *cpudata; 1488 unsigned long flags; 1489 u64 value; 1490 = 1491 if (!READ_ONCE(hwp_active) || !boot_cpu_has(X86_FEATURE_HWP_NOTIFY)) 1492 return; 1493 = 1494 rdmsrl_safe(MSR_HWP_STATUS, &value); 1495 if (!(value & 0x01)) 1496 return; 1497 = 1498 spin_lock_irqsave(&hwp_notify_lock, flags); 1499 = 1500 if (!cpumask_test_cpu(this_cpu, &hwp_intr_enable_mask)) 1501 goto ack_intr; 1502 = 1503 /* 1504 * Currently we never free all_cpu_data. And we can't reach here 1505 * without this allocated. But for safety for future changes, added 1506 * check. 1507 */ 1508 if (unlikely(!READ_ONCE(all_cpu_data))) 1509 goto ack_intr; 1510 = 1511 /* 1512 * The free is done during cleanup, when cpufreq registry is failed. 1513 * We wouldn't be here if it fails on init or switch status. But for 1514 * future changes, added check. 1515 */ 1516 cpudata =3D READ_ONCE(all_cpu_data[this_cpu]); 1517 if (unlikely(!cpudata)) 1518 goto ack_intr; 1519 = 1520 schedule_delayed_work(&cpudata->hwp_notify_work, msecs_to_jiffies(1= 0)); 1521 = 1522 spin_unlock_irqrestore(&hwp_notify_lock, flags); 1523 = 1524 return; 1525 = 1526 ack_intr: 1527 wrmsrl_safe(MSR_HWP_STATUS, 0); 1528 spin_unlock_irqrestore(&hwp_notify_lock, flags); 1529 } 1530 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3076284458213178561==--