[rafael-pm:bleeding-edge 97/99] drivers/cpufreq/intel_pstate.c:1682:70: error: 'cpunum' undeclared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx/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@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509090605.9U0N21IK-lkp@xxxxxxxxx/

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




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux