lkml.org 
[lkml]   [2017]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[tip:WIP.sched/cpusallowed 9/13] drivers//cpufreq/ia64-acpi-cpufreq.c:115:28: error: 'cpu' undeclared
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/cpusallowed
head: 4ba98c7ec4094a9123d0d6aabb4497290207b518
commit: be8a7739e09cc38b06799108380e9a6ae6cec93b [9/13] cpufreq/ia64: Use work_on_cpu()
config: ia64-allyesconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout be8a7739e09cc38b06799108380e9a6ae6cec93b
# save the attached .config to linux build tree
make.cross ARCH=ia64

All error/warnings (new ones prefixed by >>):

drivers//cpufreq/ia64-acpi-cpufreq.c: In function 'processor_set_pstate':
<command-line>:0:16: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 's64 {aka long long int}' [-Wformat=]
drivers//cpufreq/ia64-acpi-cpufreq.c:11:21: note: in expansion of macro 'KBUILD_MODNAME'
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
^~~~~~~~~~~~~~
include/linux/dynamic_debug.h:126:35: note: in expansion of macro 'pr_fmt'
__dynamic_pr_debug(&descriptor, pr_fmt(fmt), \
^~~~~~
include/linux/printk.h:333:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
drivers//cpufreq/ia64-acpi-cpufreq.c:58:3: note: in expansion of macro 'pr_debug'
pr_debug("Failed to set freq to 0x%x, with error 0x%lx\n",
^~~~~~~~
drivers//cpufreq/ia64-acpi-cpufreq.c: In function 'processor_get_pstate':
<command-line>:0:16: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 's64 {aka long long int}' [-Wformat=]
drivers//cpufreq/ia64-acpi-cpufreq.c:11:21: note: in expansion of macro 'KBUILD_MODNAME'
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
^~~~~~~~~~~~~~
include/linux/dynamic_debug.h:126:35: note: in expansion of macro 'pr_fmt'
__dynamic_pr_debug(&descriptor, pr_fmt(fmt), \
^~~~~~
include/linux/printk.h:333:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
drivers//cpufreq/ia64-acpi-cpufreq.c:80:3: note: in expansion of macro 'pr_debug'
pr_debug("Failed to get current freq with "
^~~~~~~~
drivers//cpufreq/ia64-acpi-cpufreq.c: In function 'processor_get_freq':
>> drivers//cpufreq/ia64-acpi-cpufreq.c:115:28: error: 'cpu' undeclared (first use in this function)
if (smp_processor_id() != cpu)
^~~
drivers//cpufreq/ia64-acpi-cpufreq.c:115:28: note: each undeclared identifier is reported only once for each function it appears in
drivers//cpufreq/ia64-acpi-cpufreq.c: In function 'acpi_cpufreq_target':
drivers//cpufreq/ia64-acpi-cpufreq.c:198:21: error: 'cpu' undeclared (first use in this function)
return work_on_cpu(cpu, processor_set_freq, &req);
^~~
>> drivers//cpufreq/ia64-acpi-cpufreq.c:199:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

vim +/cpu +115 drivers//cpufreq/ia64-acpi-cpufreq.c

4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 74
17e77b1c arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2006-12-01 75 retval = ia64_pal_get_pstate(&pstate_index,
17e77b1c arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2006-12-01 76 PAL_GET_PSTATE_TYPE_INSTANT);
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 77 *value = (u32) pstate_index;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 78
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 79 if (retval)
2d06d8c4 arch/ia64/kernel/cpufreq/acpi-cpufreq.c Dominik Brodowski 2011-03-27 @80 pr_debug("Failed to get current freq with "
60192db8 arch/ia64/kernel/cpufreq/acpi-cpufreq.c Denis V. Lunev 2008-07-17 81 "error 0x%lx, idx 0x%x\n", retval, *value);
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 82
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 83 return (int)retval;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 84 }
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 85
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 86
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 87 /* To be used only after data->acpi_data is initialized */
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 88 static unsigned
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 89 extract_clock (
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 90 struct cpufreq_acpi_io *data,
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 91 unsigned value)
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 92 {
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 93 unsigned long i;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 94
2d06d8c4 arch/ia64/kernel/cpufreq/acpi-cpufreq.c Dominik Brodowski 2011-03-27 95 pr_debug("extract_clock\n");
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 96
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 97 for (i = 0; i < data->acpi_data.state_count; i++) {
17e77b1c arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2006-12-01 98 if (value == data->acpi_data.states[i].status)
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 99 return data->acpi_data.states[i].core_frequency;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 100 }
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 101 return data->acpi_data.states[i-1].core_frequency;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 102 }
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 103
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 104
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 105 static long
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 106 processor_get_freq (
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 107 void *arg)
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 108 {
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 109 struct cpufreq_acpi_req *req = arg;
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 110 struct cpufreq_acpi_io *data = acpi_io_data[req->cpu];
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 111 u32 value;
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 112 int ret;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 113
2d06d8c4 arch/ia64/kernel/cpufreq/acpi-cpufreq.c Dominik Brodowski 2011-03-27 114 pr_debug("processor_get_freq\n");
182fdd22 arch/ia64/kernel/cpufreq/acpi-cpufreq.c Alex Williamson 2007-08-13 @115 if (smp_processor_id() != cpu)
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 116 return -EAGAIN;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 117
17e77b1c arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2006-12-01 118 /* processor_get_pstate gets the instantaneous frequency */
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 119 ret = processor_get_pstate(&value);
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 120 if (ret) {
b49c22a6 drivers/cpufreq/ia64-acpi-cpufreq.c Joe Perches 2016-04-05 121 pr_warn("get performance failed with error %d\n", ret);
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 122 return ret;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 123 }
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 124 return 1000 * extract_clock(data, value);
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 125 }
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 126
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 127
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 128 static long
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 129 processor_set_freq (
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 130 void *arg)
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 131 {
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 132 struct cpufreq_acpi_req *req = arg;
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 133 unsigned int cpu = req->cpu;
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 134 struct cpufreq_acpi_io *data = acpi_io_data[cpu];
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 135 int ret, state = req->state;
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 136 u32 value;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 137
2d06d8c4 arch/ia64/kernel/cpufreq/acpi-cpufreq.c Dominik Brodowski 2011-03-27 138 pr_debug("processor_set_freq\n");
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 139 if (smp_processor_id() != cpu)
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 140 return -EAGAIN;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 141
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 142 if (state == data->acpi_data.state) {
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 143 if (unlikely(data->resume)) {
2d06d8c4 arch/ia64/kernel/cpufreq/acpi-cpufreq.c Dominik Brodowski 2011-03-27 144 pr_debug("Called after resume, resetting to P%d\n", state);
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 145 data->resume = 0;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 146 } else {
2d06d8c4 arch/ia64/kernel/cpufreq/acpi-cpufreq.c Dominik Brodowski 2011-03-27 147 pr_debug("Already at target state (P%d)\n", state);
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 148 return 0;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 149 }
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 150 }
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 151
2d06d8c4 arch/ia64/kernel/cpufreq/acpi-cpufreq.c Dominik Brodowski 2011-03-27 152 pr_debug("Transitioning from P%d to P%d\n",
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 153 data->acpi_data.state, state);
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 154
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 155 /*
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 156 * First we write the target state's 'control' value to the
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 157 * control_register.
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 158 */
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 159 value = (u32) data->acpi_data.states[state].control;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 160
2d06d8c4 arch/ia64/kernel/cpufreq/acpi-cpufreq.c Dominik Brodowski 2011-03-27 161 pr_debug("Transitioning to state: 0x%08x\n", value);
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 162
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 163 ret = processor_set_pstate(value);
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 164 if (ret) {
b49c22a6 drivers/cpufreq/ia64-acpi-cpufreq.c Joe Perches 2016-04-05 165 pr_warn("Transition failed with error %d\n", ret);
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 166 return -ENODEV;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 167 }
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 168
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 169 data->acpi_data.state = state;
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 170 return 0;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 171 }
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 172
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 173
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 174 static unsigned int
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 175 acpi_cpufreq_get (
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 176 unsigned int cpu)
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 177 {
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 178 struct cpufreq_acpi_req req;
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 179 long ret;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 180
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 181 req.cpu = cpu;
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 182 ret = work_on_cpu(cpu, processor_get_freq, &req);
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 183
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 184 return ret > 0 ? (unsigned int) ret : 0;
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 185 }
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 186
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 187
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 188 static int
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 189 acpi_cpufreq_target (
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 190 struct cpufreq_policy *policy,
9c0ebcf7 drivers/cpufreq/ia64-acpi-cpufreq.c Viresh Kumar 2013-10-25 191 unsigned int index)
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 192 {
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 193 struct cpufreq_acpi_req req;
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 194
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 195 req.cpu = policy->cpu;
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 196 req.state = index;
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 197
be8a7739 drivers/cpufreq/ia64-acpi-cpufreq.c Thomas Gleixner 2017-04-06 198 return work_on_cpu(cpu, processor_set_freq, &req);
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 @199 }
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 200
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 201 static int
4db8699b arch/ia64/kernel/cpufreq/acpi-cpufreq.c Venkatesh Pallipadi 2005-07-29 202 acpi_cpufreq_cpu_init (

:::::: The code at line 115 was first introduced by commit
:::::: 182fdd225de8fc3b1b721ae944fc41146a0bd812 [IA64] Fix processor_get_freq

:::::: TO: Alex Williamson <alex.williamson@hp.com>
:::::: CC: Tony Luck <tony.luck@intel.com>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2017-04-12 22:29    [W:0.036 / U:2.700 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site