Re: [PATCH 02/12] sched_ext: Make several ext.c helpers available outside ext.c
[email protected] Sat, 01 Aug 2026 08:58:08 +0000
| Newsgroups | dev.linux.lists.sched-ext |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Low] Unconditional definition of `scx_sched_all` lacks a prototype when = `CONFIG_EXT_SUB_SCHED` is disabled, causing a build warning. -- --- Patch [2]: [PATCH 02/12] sched_ext: Make several ext.c helpers availabl= e outside ext.c --- commit 2fbc86143bb66368e04e606cb09e7ffe2b987b3d Author: Tejun Heo <[email protected]> sched_ext: Make several ext.c helpers available outside ext.c This commit exposes several helper functions and the scx_sched_all list by removing their static keywords and adding declarations in internal.h. This allows them to be utilized outside of ext.c. > --- a/kernel/sched/ext/ext.c > +++ b/kernel/sched/ext/ext.c > @@ -38,7 +38,7 @@ struct scx_sched __rcu *scx_root; > * All scheds, writers must hold both scx_enable_mutex and scx_sched_loc= k. > * Readers can hold either or rcu_read_lock(). > */ > -static LIST_HEAD(scx_sched_all); > +LIST_HEAD(scx_sched_all); [ ... ] > --- a/kernel/sched/ext/internal.h > +++ b/kernel/sched/ext/internal.h > @@ -2014,6 +2021,7 @@ extern bool scx_cgroup_enabled; > #ifdef CONFIG_EXT_SUB_SCHED > extern const struct rhashtable_params scx_sched_hash_params; > extern struct rhashtable scx_sched_hash; > +extern struct list_head scx_sched_all; [Severity: Low] Will this trigger a missing prototype warning when CONFIG_EXT_SUB_SCHED is disabled? Because scx_sched_all is defined unconditionally in ext.c, building the kernel without CONFIG_EXT_SUB_SCHED hides this extern declaration in internal.h from the compiler.=20 Should this declaration be moved outside of the ifdef block to prevent compiler or sparse warnings? > extern struct scx_sched *scx_enabling_sub_sched; > #endif --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260801085150.2697= [email protected]?part=3D2