boards: Remove per-board definition of board_init#16013
boards: Remove per-board definition of board_init#16013chrysn wants to merge 4 commits intoRIOT-OS:masterfrom
Conversation
This removes the occurrences that can easily be removed automatically.
Command used:
sed -i -z 's@\n/[\n* ]*.brief[ a-zA-Z,().-]*[\n*/ ]*\nvoid board_init(void);\n@@' boards/**/*.h
Closes: RIOT-OS#16007
| #include "periph_cpu.h" | ||
| #include "kernel_init.h" | ||
| #include "board.h" | ||
| #include "board_generic.h" |
There was a problem hiding this comment.
Shouldn't this be included in board.h instead?
There was a problem hiding this comment.
I don't know -- at some point we get to choose.
A nice aspect of separating "that where the functions any board needs to provide" from "that where board-specific macros like LED0_ON are defined" is that it reduces rebuilding, and separates otherwise unrelated concerns.
Seems not that bad. |
|
@chrysn do you think you could give this one a rebase and make it not a draft, I think we can get it in! |
|
I'll retry when my RIOT-unrelated workload is back to a level where I can; thanks for the nudge. |
|
48088cb has the removal of |
This removes the occurrences that can easily be removed automatically.
Command used:
Closes: #16007
Summary of #16007: Not all boards do it, so it's clearly not necessary, and the caller of board_init does an extern on it anyway; moreover, it clutters documentation, which should be "every board defines this to do X", not "we do X" for every board. (Notes about the concrete implementation should go to the implementation anyway).
This is not complete yet in that it only does the "easy" ones that are caught by a single-line regexp. A follow-up in here will go through the rest manually, but first I'd like to see how badly things fail.
Testing procedure
Builds still complete.