On Tue, Apr 26, 2022 at 3:42 AM Nick Desaulniers <ndesaulniers@xxxxxxxxxx> wrote: > > On Sun, Apr 24, 2022 at 12:09 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote: > > > > Import include/linux/list.h to use convenient list macros in modpost. > > > > I dropped kernel-space code such as {WRITE,READ}_ONCE etc. and unneeded > > macros. > > > > I also imported container_of() from include/linux/container_of.h and > > type definitions from include/linux/types.h. > > Is there a better way to just use the kernel headers? Presumably no. include/linux/list.h includes more. Adding so many #ifdef __KERNEL__ stubs would be really ugly. > I kind of hate > copy+paste since the in tree duplication will diverge over time. I only cherry-picked some macros from include/linux/kernel.h No need to resync. -- Best Regards Masahiro Yamada