[tip:tmp.tmp2 154/364] include/linux/latencytop.h:41:30: warning: 'struct ctl_table' declared inside parameter list will not be visible outside of this definition or declaration
From: kernel test robot
Date: Sun Jun 13 2021 - 16:45:37 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 6ca85f643325cbbcd70bc08bfab7ee67c26b8607 [154/364] sched/headers: Remove <linux/nodemask.h> from <linux/sched.h>
config: x86_64-rhel-8.3 (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/tip/tip.git/commit/?id=6ca85f643325cbbcd70bc08bfab7ee67c26b8607
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip tmp.tmp2
git checkout 6ca85f643325cbbcd70bc08bfab7ee67c26b8607
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
In file included from include/linux/sched.h:22,
from include/linux/uaccess.h:9,
from kernel/header_test_uaccess.h.c:1:
>> include/linux/latencytop.h:41:30: warning: 'struct ctl_table' declared inside parameter list will not be visible outside of this definition or declaration
41 | int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
| ^~~~~~~~~
--
In file included from include/linux/sched.h:22,
from include/linux/utsname.h:6,
from drivers/char/random.c:312:
>> include/linux/latencytop.h:41:30: warning: 'struct ctl_table' declared inside parameter list will not be visible outside of this definition or declaration
41 | int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
| ^~~~~~~~~
drivers/char/random.c:2273:6: warning: no previous prototype for 'add_hwgenerator_randomness' [-Wmissing-prototypes]
2273 | void add_hwgenerator_randomness(const char *buffer, size_t count,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/sched.h:22,
from include/linux/sched/cond_resched.h:9,
from kernel/sched/core.c:9:
>> include/linux/latencytop.h:41:30: warning: 'struct ctl_table' declared inside parameter list will not be visible outside of this definition or declaration
41 | int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
| ^~~~~~~~~
kernel/sched/core.c:3315:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes]
3315 | void sched_set_stop_task(int cpu, struct task_struct *stop)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:9032:13: warning: no previous prototype for 'per_task_init' [-Wmissing-prototypes]
9032 | void __init per_task_init(void)
| ^~~~~~~~~~~~~
--
In file included from include/linux/sched.h:22,
from kernel/sched/sched.h:8,
from kernel/sched/fair.c:23:
>> include/linux/latencytop.h:41:30: warning: 'struct ctl_table' declared inside parameter list will not be visible outside of this definition or declaration
41 | int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
| ^~~~~~~~~
kernel/sched/fair.c:10856:6: warning: no previous prototype for 'task_vruntime_update' [-Wmissing-prototypes]
10856 | void task_vruntime_update(struct rq *rq, struct task_struct *p, bool in_fi)
| ^~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/sched.h:22,
from kernel/sched/sched.h:8,
from kernel/sched/rt.c:6:
>> include/linux/latencytop.h:41:30: warning: 'struct ctl_table' declared inside parameter list will not be visible outside of this definition or declaration
41 | int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
| ^~~~~~~~~
In file included from <command-line>:
kernel/sched/rt.c: In function 'rt_task_of':
include/linux/kernel.h:706:51: error: 'struct task_struct' has no member named 'rt'
706 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~
include/linux/compiler_types.h:308:9: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:706:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
706 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:706:20: note: in expansion of macro '__same_type'
706 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
kernel/sched/rt.c:121:9: note: in expansion of macro 'container_of'
121 | return container_of(rt_se, struct task_struct, rt);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'rt'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:709:21: note: in expansion of macro 'offsetof'
709 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
kernel/sched/rt.c:121:9: note: in expansion of macro 'container_of'
121 | return container_of(rt_se, struct task_struct, rt);
| ^~~~~~~~~~~~
kernel/sched/rt.c: At top level:
kernel/sched/rt.c:671:6: warning: no previous prototype for 'sched_rt_bandwidth_account' [-Wmissing-prototypes]
671 | bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/rt.c: In function 'rt_task_of':
kernel/sched/rt.c:122:1: error: control reaches end of non-void function [-Werror=return-type]
122 | }
| ^
cc1: some warnings being treated as errors
--
In file included from include/linux/sched.h:22,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:16,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from include/linux/stop_machine.h:5,
from kernel/trace/ftrace.c:17:
>> include/linux/latencytop.h:41:30: warning: 'struct ctl_table' declared inside parameter list will not be visible outside of this definition or declaration
41 | int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
| ^~~~~~~~~
kernel/trace/ftrace.c:303:5: warning: no previous prototype for '__register_ftrace_function' [-Wmissing-prototypes]
303 | int __register_ftrace_function(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:346:5: warning: no previous prototype for '__unregister_ftrace_function' [-Wmissing-prototypes]
346 | int __unregister_ftrace_function(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:585:5: warning: no previous prototype for 'ftrace_profile_pages_init' [-Wmissing-prototypes]
585 | int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:3877:15: warning: no previous prototype for 'arch_ftrace_match_adjust' [-Wmissing-prototypes]
3877 | char * __weak arch_ftrace_match_adjust(char *str, const char *search)
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/sched.h:22,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:16,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from kernel/time/hrtimer.c:25:
>> include/linux/latencytop.h:41:30: warning: 'struct ctl_table' declared inside parameter list will not be visible outside of this definition or declaration
41 | int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
| ^~~~~~~~~
kernel/time/hrtimer.c:120:21: warning: initialized field overwritten [-Woverride-init]
120 | [CLOCK_REALTIME] = HRTIMER_BASE_REALTIME,
| ^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:120:21: note: (near initialization for 'hrtimer_clock_to_base_table[0]')
kernel/time/hrtimer.c:121:22: warning: initialized field overwritten [-Woverride-init]
121 | [CLOCK_MONOTONIC] = HRTIMER_BASE_MONOTONIC,
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:121:22: note: (near initialization for 'hrtimer_clock_to_base_table[1]')
kernel/time/hrtimer.c:122:21: warning: initialized field overwritten [-Woverride-init]
122 | [CLOCK_BOOTTIME] = HRTIMER_BASE_BOOTTIME,
| ^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:122:21: note: (near initialization for 'hrtimer_clock_to_base_table[7]')
kernel/time/hrtimer.c:123:17: warning: initialized field overwritten [-Woverride-init]
123 | [CLOCK_TAI] = HRTIMER_BASE_TAI,
| ^~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:123:17: note: (near initialization for 'hrtimer_clock_to_base_table[11]')
kernel/time/hrtimer.c: In function '__run_hrtimer':
kernel/time/hrtimer.c:1500:7: warning: variable 'expires_in_hardirq' set but not used [-Wunused-but-set-variable]
1500 | bool expires_in_hardirq;
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/sched.h:22,
from include/linux/ptrace.h:6,
from include/uapi/asm-generic/bpf_perf_event.h:4,
from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
from include/uapi/linux/bpf_perf_event.h:11,
from kernel/bpf/btf.c:6:
>> include/linux/latencytop.h:41:30: warning: 'struct ctl_table' declared inside parameter list will not be visible outside of this definition or declaration
41 | int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
| ^~~~~~~~~
kernel/bpf/btf.c: In function 'btf_seq_show':
kernel/bpf/btf.c:5694:22: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
5694 | seq_vprintf((struct seq_file *)show->target, fmt, args);
| ^~~~~~~~
kernel/bpf/btf.c: In function 'btf_snprintf_show':
kernel/bpf/btf.c:5731:2: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
5731 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
| ^~~
vim +41 include/linux/latencytop.h
9745512ce79de6 Arjan van de Ven 2008-01-25 40
32927393dc1ccd Christoph Hellwig 2020-04-24 @41 int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
32927393dc1ccd Christoph Hellwig 2020-04-24 42 size_t *lenp, loff_t *ppos);
cb2517653fccaf Mel Gorman 2016-02-05 43
:::::: The code at line 41 was first introduced by commit
:::::: 32927393dc1ccd60fb2bdc05b9e8e88753761469 sysctl: pass kernel pointers to ->proc_handler
:::::: TO: Christoph Hellwig <hch@xxxxxx>
:::::: CC: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip