All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:OLK-5.10 3112/3112] drivers/cpufreq/intel_pstate.c:1473:6: warning: no previous prototype for function 'notify_hwp_interrupt'
Date: Wed, 13 Aug 2025 22:52:17 +0200	[thread overview]
Message-ID: <202508132203.QmNm6D3S-lkp@intel.com> (raw)

tree:   https://gitee.com/openeuler/kernel.git OLK-5.10
head:   8a6052b70d77d3f0bda83a13959905e235baa1e5
commit: e217d5958ee378eb304fb0b4eb6fcb551e555842 [3112/3112] cpufreq: intel_pstate: Process HWP Guaranteed change notification
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250813/202508132203.QmNm6D3S-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 7d886fab74d4037d654d02bed24dd97c0ba863d6)
rustc: rustc 1.58.0 (02072b482 2022-01-11)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250813/202508132203.QmNm6D3S-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508132203.QmNm6D3S-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/cpufreq/intel_pstate.c:1473:6: warning: no previous prototype for function 'notify_hwp_interrupt' [-Wmissing-prototypes]
    1473 | void notify_hwp_interrupt(void)
         |      ^
   drivers/cpufreq/intel_pstate.c:1473:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    1473 | void notify_hwp_interrupt(void)
         | ^
         | static 
   drivers/cpufreq/intel_pstate.c:80:23: warning: unused function 'percent_fp' [-Wunused-function]
      80 | static inline int32_t percent_fp(int percent)
         |                       ^~~~~~~~~~
   drivers/cpufreq/intel_pstate.c:95:23: warning: unused function 'percent_ext_fp' [-Wunused-function]
      95 | static inline int32_t percent_ext_fp(int percent)
         |                       ^~~~~~~~~~~~~~
   3 warnings generated.


vim +/notify_hwp_interrupt +1473 drivers/cpufreq/intel_pstate.c

  1472	
> 1473	void notify_hwp_interrupt(void)
  1474	{
  1475		unsigned int this_cpu = smp_processor_id();
  1476		struct cpudata *cpudata;
  1477		unsigned long flags;
  1478		u64 value;
  1479	
  1480		if (!READ_ONCE(hwp_active) || !boot_cpu_has(X86_FEATURE_HWP_NOTIFY))
  1481			return;
  1482	
  1483		rdmsrl_safe(MSR_HWP_STATUS, &value);
  1484		if (!(value & 0x01))
  1485			return;
  1486	
  1487		spin_lock_irqsave(&hwp_notify_lock, flags);
  1488	
  1489		if (!cpumask_test_cpu(this_cpu, &hwp_intr_enable_mask))
  1490			goto ack_intr;
  1491	
  1492		/*
  1493		 * Currently we never free all_cpu_data. And we can't reach here
  1494		 * without this allocated. But for safety for future changes, added
  1495		 * check.
  1496		 */
  1497		if (unlikely(!READ_ONCE(all_cpu_data)))
  1498			goto ack_intr;
  1499	
  1500		/*
  1501		 * The free is done during cleanup, when cpufreq registry is failed.
  1502		 * We wouldn't be here if it fails on init or switch status. But for
  1503		 * future changes, added check.
  1504		 */
  1505		cpudata = READ_ONCE(all_cpu_data[this_cpu]);
  1506		if (unlikely(!cpudata))
  1507			goto ack_intr;
  1508	
  1509		schedule_delayed_work(&cpudata->hwp_notify_work, msecs_to_jiffies(10));
  1510	
  1511		spin_unlock_irqrestore(&hwp_notify_lock, flags);
  1512	
  1513		return;
  1514	
  1515	ack_intr:
  1516		wrmsrl_safe(MSR_HWP_STATUS, 0);
  1517		spin_unlock_irqrestore(&hwp_notify_lock, flags);
  1518	}
  1519	

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

                 reply	other threads:[~2025-08-13 20:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202508132203.QmNm6D3S-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kernel@openeuler.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.