lkml.org 
[lkml]   [2022]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v2 03/13] module: Move livepatch support to a separate file
Petr Mladek <pmladek@suse.com> wrote on Wed [2022-Jan-12 17:53:56 +0100]:
> It would be better to have the two variants close each other. I mean
> to have it somewhere like:
>
> #ifdef CONFIG_LIVEPATCH
>
> variant A
>
> #else
>
> variant B
>
> #endif
>

<snip>

> #ifdef CONFIG_LIVEPATCH
> static inline bool set_livepatch_module(struct module *mod)
> {
> mod->klp = true;
> return true;
> }
> #else /* !CONFIG_LIVEPATCH */
> static inline bool set_livepatch_module(struct module *mod)
> {
> return false;
> }
> #endif /* CONFIG_LIVEPATCH */
>
>
> Well, it might be matter of taste. Others might prefer another solution.
> Adding live-patching mailing list into Cc.

+1 -- this seems like a cleaner approach.

- David

\
 
 \ /
  Last update: 2022-01-12 19:41    [W:0.090 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site