lkml.org 
[lkml]   [2021]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH -next] buildid: fix build when CONFIG_MODULES is not set
Quoting Randy Dunlap (2021-05-13 10:15:10)
> Omit the static_assert() when CONFIG_MODULES is not set/enabled.
> Fixes these build errors:
>
> ../kernel/kallsyms.c: In function ‘__sprint_symbol’:
> ../include/linux/kernel.h:53:43: error: dereferencing pointer to incomplete type ‘struct module’
> #define typeof_member(T, m) typeof(((T*)0)->m)
> ^
> ../include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(typeof_member(struct module, build_id)) == 20"
> #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
> ^
> ../kernel/kallsyms.c:454:4: note: in expansion of macro ‘static_assert’
> static_assert(sizeof(typeof_member(struct module, build_id)) == 20);
> ^~~~~~~~~~~~~
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Stephen Boyd <swboyd@chromium.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

Thanks. I didn't realize that there was an ifdef around the definition
of 'struct module'.

\
 
 \ /
  Last update: 2021-05-14 08:55    [W:0.037 / U:1.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site