kernel: add 'static' keyword where possible #3204
Merged
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.
This PR is somewhat dual to PR #3183 resp. #3202: it adds
staticto as many functions and variables as possible. This helps to find dead code (see e.g. PR #3203), may help compilers to do better optimizations, and also is a step towards defining a larger "libgap" API, by "hiding" away stuff that we do not explicitly want to export (this makes it harder to "cheat" and call those functions anyway; now people who want to do that hopefully will instead talk to us to get us to export them, giving us a chance to define a proper API).The second commit is optional and clang-formats the first commit, based on the idea that if we touch those lines anyway, we might as well reformat them, too.