On Sun, Apr 24, 2022 at 12:09 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote: > > Currently, modpost manages modules in a singly liked list; it adds a new s/liked/linked/ > node to the head, and traverses the list from new to old. > > It works, but the error messages are shown in the reverse order. > > If you have a Makefile like this: > > obj-m += foo.o bar.o > > then, modpost shows error messages in bar.o, foo.o, in this order. > > Use a doubly linked list to keep the order in modules.order; use > list_add_tail() for the node addition and list_for_each_entry() for > the list traverse. > > Now that the kernel's list macros have been imported to modpost, I will > use them actively going forward. > > Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx> Thanks for the patch! Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx> -- Thanks, ~Nick Desaulniers