Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

Song Liu
2024-09-09T21:43:54Z

On Mon, Sep 9, 2024 at 2:19 PM Josh Poimboeuf <jpoimboe@kernel.org> wrote:
>
> On Sat, Sep 07, 2024 at 10:04:25PM -0700, Song Liu wrote:
> > I think gcc doesn't complain, but clang does:
> >
> > $ cat ttt.c
> > static inline void ret(void)
> > {
> > return;
> > }
> >
> > int main(void)
> > {
> > return 0;
> > }
>
> Ah... That's probably why the kernel adds "__maybe_unused" to its
> inline macro (which the tools don't have).
>
> Does this fix?

Yes! It fixes this problem.

Thanks,
Song