Commit 28f152c
sched/rt: fix build error when CONFIG_SYSCTL is disable
Avoid random build errors which do not select
CONFIG_SYSCTL by depending on it in Kconfig.
This fixes the following warning:
In file included from kernel/sched/build_policy.c:43:
At top level:
kernel/sched/rt.c:3017:12: error: ‘sched_rr_handler’ defined but not used [-Werror=unused-function]
3017 | static int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
| ^~~~~~~~~~~~~~~~
kernel/sched/rt.c:2978:12: error: ‘sched_rt_handler’ defined but not used [-Werror=unused-function]
2978 | static int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:310: kernel/sched/build_policy.o] Error 1
make[1]: *** [scripts/Makefile.build:638: kernel/sched] Error 2
make[1]: *** Waiting for unfinished jobs....
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baisong Zhong <zhongbaisong@huawei.com>
[mcgrof: small build fix, we need sched_rt_can_attach() even
when CONFIG_SYSCTL is disabled]
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>1 parent dafd7a9 commit 28f152c
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
2911 | 2911 | | |
2912 | 2912 | | |
2913 | 2913 | | |
| 2914 | + | |
2914 | 2915 | | |
2915 | 2916 | | |
2916 | 2917 | | |
| |||
2921 | 2922 | | |
2922 | 2923 | | |
2923 | 2924 | | |
| 2925 | + | |
2924 | 2926 | | |
2925 | 2927 | | |
2926 | 2928 | | |
| |||
2932 | 2934 | | |
2933 | 2935 | | |
2934 | 2936 | | |
| 2937 | + | |
| 2938 | + | |
2935 | 2939 | | |
2936 | 2940 | | |
2937 | 2941 | | |
| |||
2949 | 2953 | | |
2950 | 2954 | | |
2951 | 2955 | | |
| 2956 | + | |
2952 | 2957 | | |
2953 | 2958 | | |
| 2959 | + | |
2954 | 2960 | | |
2955 | 2961 | | |
2956 | 2962 | | |
| |||
3035 | 3041 | | |
3036 | 3042 | | |
3037 | 3043 | | |
| 3044 | + | |
3038 | 3045 | | |
3039 | 3046 | | |
3040 | 3047 | | |
| |||
0 commit comments