initcall support - #82
Merged
rikvanriel merged 4 commits intoAug 28, 2026
Merged
Conversation
`subsys_initcall(cgwb_init)` sits inside `#ifdef CONFIG_CGROUP_WRITEBACK`, so its statement's parent is the conditional rather than the translation unit, and the file-scope test rejected it. Every initcall written that way was skipped: 2,236 recorded, 2,581 after walking out through the conditional. Assisted-by: claw:claude-opus-5 Signed-off-by: Rik van Riel <[email protected]>
Nothing in the source calls an initcall — the macro puts a pointer in a
section that do_initcalls() walks — so `callers cgwb_init` answered that no
functions call it. That is true of the source and reads as dead code, which is
the opposite of what the function is.
State the level it is filed under, and keep the source fact separate from it:
(semcode) callers cgwb_init
Entry point: runs at boot, filed as subsys_initcall
Info: nothing in the source calls it
Assisted-by: claw:claude-opus-5
Signed-off-by: Rik van Riel <[email protected]>
`callers e1000_exit_module` answered that it runs at boot. A module's exit
function runs when the module is removed, and its init function runs when the
module is inserted, which is boot only for a built-in.
Both were reported the same way because every level got one sentence:
Entry point: runs when the module is removed, filed as module_exit
Entry point: runs when the module is inserted, or at boot if built in, filed as module_init
Entry point: runs at boot, filed as subsys_initcall
Assisted-by: claw:claude-opus-5
Signed-off-by: Rik van Riel <[email protected]>
`__setup("init=", init_setup)` puts the handler in .init.setup, where the
command line parser finds it, and `callers init_setup` reported that nothing
calls it. Same for every kernel parameter handler and every device tree
provider: 493 CLK_OF_DECLARE, 428 __setup, 360 early_param, 183
IRQCHIP_DECLARE, 137 TIMER_OF_DECLARE.
Describe the families in one table, with the argument that names the function
and when the section is walked, and record them the way initcalls already are.
8,332 entry points recorded before, 9,940 after:
(semcode) callers init_setup
Entry point: runs at boot if the kernel is given that parameter, filed as __setup
(semcode) callers of_fixed_clk_setup
Entry point: runs when a device tree node matches, filed as CLK_OF_DECLARE
These take the function at a fixed position beside a string, so the position
is part of what is recorded; taking the first argument would record the
parameter name as a function.
There is no rule in the source that finds these on its own. The section
attribute is inside the macro definition and the name it builds is often
pasted together there, so the families are listed rather than derived.
Assisted-by: claw:claude-opus-5
Signed-off-by: Rik van Riel <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Track initcalls of various kinds, including module_init and module_exit.