From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [chrome-os:chromeos-5.10 11/17] drivers/devfreq/governor_passive.c:247:25: error: assignment to 'struct devfreq_cpu_data *' from incompatible pointer type 'struct cpuinfo_um *'
Date: Wed, 26 May 2021 22:05:58 +0800 [thread overview]
Message-ID: <202105262253.2pkCysbF-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 12313 bytes --]
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: f9e5ab338f92f4f14bfe5b5d340a6947495d5b2c
commit: 13f1f28be1c3177ad97e5b9015b9658705064a3f [11/17] FIXUP: FROMGIT: PM / devfreq: Add cpu based scaling support to passive governor
config: um-randconfig-r024-20210526 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout 13f1f28be1c3177ad97e5b9015b9658705064a3f
# save the attached .config to linux build tree
make W=1 ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
52 | struct devfreq_cpu_data *cpu_data;
| ^~~~~~~~
drivers/devfreq/governor_passive.c:58:12: error: lvalue required as left operand of assignment
58 | cpu_data = p_data->cpudata[cpu];
| ^
drivers/devfreq/governor_passive.c:59:7: warning: the address of 'boot_cpu_data' will always evaluate as 'true' [-Waddress]
59 | if (!cpu_data || cpu_data->first_cpu != cpu)
| ^
drivers/devfreq/governor_passive.c:59:28: error: 'struct cpuinfo_um' has no member named 'first_cpu'
59 | if (!cpu_data || cpu_data->first_cpu != cpu)
| ^~
drivers/devfreq/governor_passive.c:63:21: error: 'struct cpuinfo_um' has no member named 'cur_freq'
63 | cpu_cur = cpu_data->cur_freq * HZ_PER_KHZ;
| ^~
drivers/devfreq/governor_passive.c:64:49: error: 'struct cpuinfo_um' has no member named 'dev'
64 | freq = get_taget_freq_by_required_opp(cpu_data->dev,
| ^~
drivers/devfreq/governor_passive.c:65:14: error: 'struct cpuinfo_um' has no member named 'opp_table'
65 | cpu_data->opp_table,
| ^~
drivers/devfreq/governor_passive.c:75:21: error: 'struct cpuinfo_um' has no member named 'min_freq'
75 | cpu_min = cpu_data->min_freq;
| ^~
drivers/devfreq/governor_passive.c:76:21: error: 'struct cpuinfo_um' has no member named 'max_freq'
76 | cpu_max = cpu_data->max_freq;
| ^~
drivers/devfreq/governor_passive.c:77:21: error: 'struct cpuinfo_um' has no member named 'cur_freq'
77 | cpu_cur = cpu_data->cur_freq;
| ^~
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:92,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/devfreq/governor_passive.c:10:
drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_notifier_call':
arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:165:27: note: in expansion of macro 'cpu_data'
165 | struct devfreq_cpu_data *cpu_data;
| ^~~~~~~~
drivers/devfreq/governor_passive.c:174:11: error: lvalue required as left operand of assignment
174 | cpu_data = data->cpudata[freqs->policy->cpu];
| ^
drivers/devfreq/governor_passive.c:175:14: error: 'struct cpuinfo_um' has no member named 'cur_freq'
175 | if (cpu_data->cur_freq == freqs->new)
| ^~
drivers/devfreq/governor_passive.c:178:21: error: 'struct cpuinfo_um' has no member named 'cur_freq'
178 | cur_freq = cpu_data->cur_freq;
| ^~
drivers/devfreq/governor_passive.c:179:10: error: 'struct cpuinfo_um' has no member named 'cur_freq'
179 | cpu_data->cur_freq = freqs->new;
| ^~
drivers/devfreq/governor_passive.c:185:11: error: 'struct cpuinfo_um' has no member named 'cur_freq'
185 | cpu_data->cur_freq = cur_freq;
| ^~
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:92,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/devfreq/governor_passive.c:10:
drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_register_notifier':
arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:199:27: note: in expansion of macro 'cpu_data'
199 | struct devfreq_cpu_data *cpu_data;
| ^~~~~~~~
drivers/devfreq/governor_passive.c:221:13: error: lvalue required as left operand of assignment
221 | cpu_data = kzalloc(sizeof(*cpu_data), GFP_KERNEL);
| ^
drivers/devfreq/governor_passive.c:222:8: warning: the address of 'boot_cpu_data' will always evaluate as 'true' [-Waddress]
222 | if (!cpu_data) {
| ^
drivers/devfreq/governor_passive.c:240:12: error: 'struct cpuinfo_um' has no member named 'dev'
240 | cpu_data->dev = cpu_dev;
| ^~
drivers/devfreq/governor_passive.c:241:12: error: 'struct cpuinfo_um' has no member named 'opp_table'
241 | cpu_data->opp_table = opp_table;
| ^~
drivers/devfreq/governor_passive.c:242:12: error: 'struct cpuinfo_um' has no member named 'first_cpu'
242 | cpu_data->first_cpu = cpumask_first(policy->related_cpus);
| ^~
drivers/devfreq/governor_passive.c:243:12: error: 'struct cpuinfo_um' has no member named 'cur_freq'
243 | cpu_data->cur_freq = policy->cur;
| ^~
drivers/devfreq/governor_passive.c:244:12: error: 'struct cpuinfo_um' has no member named 'min_freq'
244 | cpu_data->min_freq = policy->cpuinfo.min_freq;
| ^~
drivers/devfreq/governor_passive.c:245:12: error: 'struct cpuinfo_um' has no member named 'max_freq'
245 | cpu_data->max_freq = policy->cpuinfo.max_freq;
| ^~
>> drivers/devfreq/governor_passive.c:247:25: error: assignment to 'struct devfreq_cpu_data *' from incompatible pointer type 'struct cpuinfo_um *' [-Werror=incompatible-pointer-types]
247 | p_data->cpudata[cpu] = cpu_data;
| ^
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:92,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/devfreq/governor_passive.c:10:
drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_unregister_notifier':
arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:272:27: note: in expansion of macro 'cpu_data'
272 | struct devfreq_cpu_data *cpu_data;
| ^~~~~~~~
drivers/devfreq/governor_passive.c:279:12: error: lvalue required as left operand of assignment
279 | cpu_data = p_data->cpudata[cpu];
| ^
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:92,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/devfreq/governor_passive.c:10:
arch/um/include/asm/processor-generic.h:97:18: warning: the address of 'boot_cpu_data' will always evaluate as 'true' [-Waddress]
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:280:7: note: in expansion of macro 'cpu_data'
280 | if (cpu_data) {
| ^~~~~~~~
drivers/devfreq/governor_passive.c:281:16: error: 'struct cpuinfo_um' has no member named 'opp_table'
281 | if (cpu_data->opp_table)
| ^~
drivers/devfreq/governor_passive.c:282:38: error: 'struct cpuinfo_um' has no member named 'opp_table'
282 | dev_pm_opp_put_opp_table(cpu_data->opp_table);
| ^~
drivers/devfreq/governor_passive.c:284:13: error: lvalue required as left operand of assignment
284 | cpu_data = NULL;
| ^
cc1: some warnings being treated as errors
vim +247 drivers/devfreq/governor_passive.c
192
193 static int cpufreq_passive_register_notifier(struct devfreq *devfreq)
194 {
195 struct devfreq_passive_data *p_data
196 = (struct devfreq_passive_data *)devfreq->data;
197 struct device *dev = devfreq->dev.parent;
198 struct opp_table *opp_table = NULL;
199 struct devfreq_cpu_data *cpu_data;
200 struct cpufreq_policy *policy;
201 struct device *cpu_dev;
202 unsigned int cpu;
203 int ret;
204
205 get_online_cpus();
206
207 p_data->nb.notifier_call = cpufreq_passive_notifier_call;
208 ret = cpufreq_register_notifier(&p_data->nb, CPUFREQ_TRANSITION_NOTIFIER);
209 if (ret) {
210 dev_err(dev, "failed to register cpufreq notifier\n");
211 p_data->nb.notifier_call = NULL;
212 goto out;
213 }
214
215 for_each_online_cpu(cpu) {
216 if (p_data->cpudata[cpu])
217 continue;
218
219 policy = cpufreq_cpu_get(cpu);
220 if (policy) {
221 cpu_data = kzalloc(sizeof(*cpu_data), GFP_KERNEL);
222 if (!cpu_data) {
223 ret = -ENOMEM;
224 goto out;
225 }
226
227 cpu_dev = get_cpu_device(cpu);
228 if (!cpu_dev) {
229 dev_err(dev, "failed to get cpu device\n");
230 ret = -ENODEV;
231 goto out;
232 }
233
234 opp_table = dev_pm_opp_get_opp_table(cpu_dev);
235 if (IS_ERR(opp_table)) {
236 ret = PTR_ERR(opp_table);
237 goto out;
238 }
239
240 cpu_data->dev = cpu_dev;
241 cpu_data->opp_table = opp_table;
242 cpu_data->first_cpu = cpumask_first(policy->related_cpus);
243 cpu_data->cur_freq = policy->cur;
244 cpu_data->min_freq = policy->cpuinfo.min_freq;
245 cpu_data->max_freq = policy->cpuinfo.max_freq;
246
> 247 p_data->cpudata[cpu] = cpu_data;
248 cpufreq_cpu_put(policy);
249 } else {
250 ret = -EPROBE_DEFER;
251 goto out;
252 }
253 }
254 out:
255 put_online_cpus();
256 if (ret)
257 return ret;
258
259 mutex_lock(&devfreq->lock);
260 ret = devfreq_update_target(devfreq, 0L);
261 mutex_unlock(&devfreq->lock);
262 if (ret)
263 dev_err(dev, "failed to update the frequency\n");
264
265 return ret;
266 }
267
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 14636 bytes --]
reply other threads:[~2021-05-26 14:05 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=202105262253.2pkCysbF-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.