From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [chanwoo:devfreq-testing-passive-gov 14/15] include/linux/devfreq.h:332:1: warning: no semicolon at end of struct or union
Date: Wed, 31 Mar 2021 23:10:56 +0800 [thread overview]
Message-ID: <202103312349.6IDPMZas-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 18057 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing-passive-gov
head: 801b60f356489d7a4525d95b615e00544ba34729
commit: 58c52e7878cc305830bc4c784ebdb6cba7a94c87 [14/15] PM / devfreq: Add cpu based scaling support to passive governor
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git/commit/?id=58c52e7878cc305830bc4c784ebdb6cba7a94c87
git remote add chanwoo https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
git fetch --no-tags chanwoo devfreq-testing-passive-gov
git checkout 58c52e7878cc305830bc4c784ebdb6cba7a94c87
# 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 warnings (new ones prefixed by >>):
cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
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_simpleondemand.c:10:
arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
97 | #define cpu_data (&boot_cpu_data)
| ^
include/linux/devfreq.h:331:27: note: in expansion of macro 'cpu_data'
331 | struct devfreq_cpu_data *cpu_data[NR_CPUS];
| ^~~~~~~~
In file included from drivers/devfreq/governor_simpleondemand.c:11:
>> include/linux/devfreq.h:332:1: warning: no semicolon at end of struct or union
332 | };
| ^
--
cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
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:19: error: expected identifier or '(' before '&' token
97 | #define cpu_data (&boot_cpu_data)
| ^
include/linux/devfreq.h:331:27: note: in expansion of macro 'cpu_data'
331 | struct devfreq_cpu_data *cpu_data[NR_CPUS];
| ^~~~~~~~
In file included from drivers/devfreq/governor_passive.c:16:
>> include/linux/devfreq.h:332:1: warning: no semicolon at end of struct or union
332 | };
| ^
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 'get_target_freq_with_cpufreq':
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:52:27: note: in expansion of macro 'cpu_data'
52 | struct devfreq_cpu_data *cpu_data;
| ^~~~~~~~
arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:58:22: note: in expansion of macro 'cpu_data'
58 | cpu_data = p_data->cpu_data[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;
| ^~
>> drivers/devfreq/governor_passive.c:50:31: warning: variable 'p_data' set but not used [-Wunused-but-set-variable]
50 | struct devfreq_passive_data *p_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_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:214:27: note: in expansion of macro 'cpu_data'
214 | struct devfreq_cpu_data *cpu_data;
| ^~~~~~~~
arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:220:10: note: in expansion of macro 'cpu_data'
220 | !data->cpu_data[freqs->policy->cpu])
| ^~~~~~~~
arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:223:19: note: in expansion of macro 'cpu_data'
223 | cpu_data = data->cpu_data[freqs->policy->cpu];
| ^~~~~~~~
drivers/devfreq/governor_passive.c:224:14: error: 'struct cpuinfo_um' has no member named 'cur_freq'
224 | if (cpu_data->cur_freq == freqs->new)
| ^~
drivers/devfreq/governor_passive.c:227:21: error: 'struct cpuinfo_um' has no member named 'cur_freq'
227 | cur_freq = cpu_data->cur_freq;
| ^~
drivers/devfreq/governor_passive.c:228:10: error: 'struct cpuinfo_um' has no member named 'cur_freq'
228 | cpu_data->cur_freq = freqs->new;
| ^~
drivers/devfreq/governor_passive.c:234:11: error: 'struct cpuinfo_um' has no member named 'cur_freq'
234 | 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:248:27: note: in expansion of macro 'cpu_data'
248 | struct devfreq_cpu_data *cpu_data;
| ^~~~~~~~
arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:265:15: note: in expansion of macro 'cpu_data'
265 | if (p_data->cpu_data[cpu])
| ^~~~~~~~
drivers/devfreq/governor_passive.c:270:13: error: lvalue required as left operand of assignment
270 | cpu_data = kzalloc(sizeof(*cpu_data), GFP_KERNEL);
| ^
drivers/devfreq/governor_passive.c:271:8: warning: the address of 'boot_cpu_data' will always evaluate as 'true' [-Waddress]
271 | if (!cpu_data) {
| ^
drivers/devfreq/governor_passive.c:289:12: error: 'struct cpuinfo_um' has no member named 'dev'
289 | cpu_data->dev = cpu_dev;
| ^~
drivers/devfreq/governor_passive.c:290:12: error: 'struct cpuinfo_um' has no member named 'opp_table'
290 | cpu_data->opp_table = opp_table;
| ^~
drivers/devfreq/governor_passive.c:291:12: error: 'struct cpuinfo_um' has no member named 'first_cpu'
291 | cpu_data->first_cpu = cpumask_first(policy->related_cpus);
| ^~
drivers/devfreq/governor_passive.c:292:12: error: 'struct cpuinfo_um' has no member named 'cur_freq'
292 | cpu_data->cur_freq = policy->cur;
| ^~
drivers/devfreq/governor_passive.c:293:12: error: 'struct cpuinfo_um' has no member named 'min_freq'
293 | cpu_data->min_freq = policy->cpuinfo.min_freq;
| ^~
drivers/devfreq/governor_passive.c:294:12: error: 'struct cpuinfo_um' has no member named 'max_freq'
294 | cpu_data->max_freq = policy->cpuinfo.max_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:
arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:296:12: note: in expansion of macro 'cpu_data'
296 | p_data->cpu_data[cpu] = cpu_data;
| ^~~~~~~~
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:321:27: note: in expansion of macro 'cpu_data'
321 | struct devfreq_cpu_data *cpu_data;
| ^~~~~~~~
arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:328:22: note: in expansion of macro 'cpu_data'
328 | cpu_data = p_data->cpu_data[cpu];
| ^~~~~~~~
>> 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:329:7: note: in expansion of macro 'cpu_data'
329 | if (cpu_data) {
| ^~~~~~~~
drivers/devfreq/governor_passive.c:330:16: error: 'struct cpuinfo_um' has no member named 'opp_table'
330 | if (cpu_data->opp_table)
| ^~
drivers/devfreq/governor_passive.c:331:38: error: 'struct cpuinfo_um' has no member named 'opp_table'
331 | dev_pm_opp_put_opp_table(cpu_data->opp_table);
| ^~
drivers/devfreq/governor_passive.c:333:13: error: lvalue required as left operand of assignment
333 | cpu_data = NULL;
| ^
vim +332 include/linux/devfreq.h
58c52e7878cc30 Saravana Kannan 2021-03-02 296
996133119f5733 Chanwoo Choi 2016-03-22 297 /**
7a51320ecd3942 Mauro Carvalho Chehab 2020-03-17 298 * struct devfreq_passive_data - ``void *data`` fed to struct devfreq
996133119f5733 Chanwoo Choi 2016-03-22 299 * and devfreq_add_device
996133119f5733 Chanwoo Choi 2016-03-22 300 * @parent: the devfreq instance of parent device.
996133119f5733 Chanwoo Choi 2016-03-22 301 * @get_target_freq: Optional callback, Returns desired operating frequency
996133119f5733 Chanwoo Choi 2016-03-22 302 * for the device using passive governor. That is called
996133119f5733 Chanwoo Choi 2016-03-22 303 * when passive governor should decide the next frequency
996133119f5733 Chanwoo Choi 2016-03-22 304 * by using the new frequency of parent devfreq device
996133119f5733 Chanwoo Choi 2016-03-22 305 * using governors except for passive governor.
996133119f5733 Chanwoo Choi 2016-03-22 306 * If the devfreq device has the specific method to decide
996133119f5733 Chanwoo Choi 2016-03-22 307 * the next frequency, should use this callback.
58c52e7878cc30 Saravana Kannan 2021-03-02 308 + * @parent_type parent type of the device
58c52e7878cc30 Saravana Kannan 2021-03-02 309 + * @this: the devfreq instance of own device.
58c52e7878cc30 Saravana Kannan 2021-03-02 310 + * @nb: the notifier block for DEVFREQ_TRANSITION_NOTIFIER list
58c52e7878cc30 Saravana Kannan 2021-03-02 311 + * @cpu_data: the state min/max/current frequency of all online cpu's
996133119f5733 Chanwoo Choi 2016-03-22 312 *
996133119f5733 Chanwoo Choi 2016-03-22 313 * The devfreq_passive_data have to set the devfreq instance of parent
996133119f5733 Chanwoo Choi 2016-03-22 314 * device with governors except for the passive governor. But, don't need to
996133119f5733 Chanwoo Choi 2016-03-22 315 * initialize the 'this' and 'nb' field because the devfreq core will handle
996133119f5733 Chanwoo Choi 2016-03-22 316 * them.
996133119f5733 Chanwoo Choi 2016-03-22 317 */
996133119f5733 Chanwoo Choi 2016-03-22 318 struct devfreq_passive_data {
996133119f5733 Chanwoo Choi 2016-03-22 319 /* Should set the devfreq instance of parent device */
996133119f5733 Chanwoo Choi 2016-03-22 320 struct devfreq *parent;
996133119f5733 Chanwoo Choi 2016-03-22 321
996133119f5733 Chanwoo Choi 2016-03-22 322 /* Optional callback to decide the next frequency of passvice device */
996133119f5733 Chanwoo Choi 2016-03-22 323 int (*get_target_freq)(struct devfreq *this, unsigned long *freq);
996133119f5733 Chanwoo Choi 2016-03-22 324
58c52e7878cc30 Saravana Kannan 2021-03-02 325 /* Should set the type of parent device */
58c52e7878cc30 Saravana Kannan 2021-03-02 326 enum devfreq_parent_dev_type parent_type;
58c52e7878cc30 Saravana Kannan 2021-03-02 327
996133119f5733 Chanwoo Choi 2016-03-22 328 /* For passive governor's internal use. Don't need to set them */
996133119f5733 Chanwoo Choi 2016-03-22 329 struct devfreq *this;
996133119f5733 Chanwoo Choi 2016-03-22 330 struct notifier_block nb;
58c52e7878cc30 Saravana Kannan 2021-03-02 @331 struct devfreq_cpu_data *cpu_data[NR_CPUS];
996133119f5733 Chanwoo Choi 2016-03-22 @332 };
996133119f5733 Chanwoo Choi 2016-03-22 333 #endif
996133119f5733 Chanwoo Choi 2016-03-22 334
:::::: The code at line 332 was first introduced by commit
:::::: 996133119f57334c38b020dbfaaac5b5eb127e29 PM / devfreq: Add new passive governor
:::::: TO: Chanwoo Choi <cw00.choi@samsung.com>
:::::: CC: MyungJoo Ham <myungjoo.ham@samsung.com>
---
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: 24354 bytes --]
reply other threads:[~2021-03-31 15:10 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=202103312349.6IDPMZas-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.