public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: oe-kbuild-all@lists.linux.dev, linux-acpi@vger.kernel.org,
	linux-pm@vger.kernel.org, Zihuan Zhang <zhangzihuan@kylinos.cn>
Subject: [rafael-pm:bleeding-edge 97/99] drivers/cpufreq/intel_pstate.c:1682:70: error: 'cpunum' undeclared
Date: Tue, 9 Sep 2025 06:48:11 +0800	[thread overview]
Message-ID: <202509090605.9U0N21IK-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head:   f201aa3fccf8e14001fba263e82af41c881498f9
commit: dd08703a10a122a3018e2e4f43d693fffe3120aa [97/99] cpufreq: intel_pstate: Rearrange freq QoS updates using __free()
config: x86_64-buildonly-randconfig-003-20250909 (https://download.01.org/0day-ci/archive/20250909/202509090605.9U0N21IK-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250909/202509090605.9U0N21IK-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/202509090605.9U0N21IK-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:22,
                    from arch/x86/include/asm/bug.h:103,
                    from arch/x86/include/asm/alternative.h:9,
                    from arch/x86/include/asm/barrier.h:5,
                    from include/asm-generic/bitops/generic-non-atomic.h:7,
                    from include/linux/bitops.h:28,
                    from include/linux/kernel.h:23,
                    from drivers/cpufreq/intel_pstate.c:11:
   drivers/cpufreq/intel_pstate.c: In function 'update_cpu_qos_request':
>> drivers/cpufreq/intel_pstate.c:1682:70: error: 'cpunum' undeclared (first use in this function)
    1682 |                 pr_warn("Failed to update freq constraint: CPU%d\n", cpunum);
         |                                                                      ^~~~~~
   include/linux/printk.h:486:33: note: in definition of macro 'printk_index_wrap'
     486 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   include/linux/printk.h:567:9: note: in expansion of macro 'printk'
     567 |         printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   drivers/cpufreq/intel_pstate.c:1682:17: note: in expansion of macro 'pr_warn'
    1682 |                 pr_warn("Failed to update freq constraint: CPU%d\n", cpunum);
         |                 ^~~~~~~
   drivers/cpufreq/intel_pstate.c:1682:70: note: each undeclared identifier is reported only once for each function it appears in
    1682 |                 pr_warn("Failed to update freq constraint: CPU%d\n", cpunum);
         |                                                                      ^~~~~~
   include/linux/printk.h:486:33: note: in definition of macro 'printk_index_wrap'
     486 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   include/linux/printk.h:567:9: note: in expansion of macro 'printk'
     567 |         printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   drivers/cpufreq/intel_pstate.c:1682:17: note: in expansion of macro 'pr_warn'
    1682 |                 pr_warn("Failed to update freq constraint: CPU%d\n", cpunum);
         |                 ^~~~~~~


vim +/cpunum +1682 drivers/cpufreq/intel_pstate.c

  1654	
  1655	static void update_cpu_qos_request(int cpu, enum freq_qos_req_type type)
  1656	{
  1657		struct cpudata *cpudata = all_cpu_data[cpu];
  1658		struct freq_qos_request *req;
  1659		unsigned int freq, perf_pct;
  1660	
  1661		struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpu);
  1662		if (!policy)
  1663			return;
  1664	
  1665		req = policy->driver_data;
  1666		if (!req)
  1667			return;
  1668	
  1669		if (hwp_active)
  1670			intel_pstate_get_hwp_cap(cpudata);
  1671	
  1672		if (type == FREQ_QOS_MIN) {
  1673			perf_pct = global.min_perf_pct;
  1674		} else {
  1675			req++;
  1676			perf_pct = global.max_perf_pct;
  1677		}
  1678	
  1679		freq = DIV_ROUND_UP(cpudata->pstate.turbo_freq * perf_pct, 100);
  1680	
  1681		if (freq_qos_update_request(req, freq) < 0)
> 1682			pr_warn("Failed to update freq constraint: CPU%d\n", cpunum);
  1683	}
  1684	

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

                 reply	other threads:[~2025-09-08 22:49 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=202509090605.9U0N21IK-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rjw@rjwysocki.net \
    --cc=zhangzihuan@kylinos.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox