Messages in this thread | | | From | Masahiro Yamada <> | Date | Tue, 26 Apr 2022 13:05:50 +0900 | Subject | Re: [PATCH 07/27] modpost: import include/linux/list.h |
| |
On Tue, Apr 26, 2022 at 3:42 AM Nick Desaulniers <ndesaulniers@google.com> wrote: > > On Sun, Apr 24, 2022 at 12:09 PM Masahiro Yamada <masahiroy@kernel.org> 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
| |