Thread (8 messages) 8 messages, 4 authors, 2022-07-07

Re: [PATCH -next] evm: Use IS_ENABLED to initialize .enabled

From: Eric Biggers <ebiggers@kernel.org>
Date: 2022-06-22 02:17:53
Also in: linux-integrity, lkml

On Tue, Jun 21, 2022 at 10:03:39AM -0400, Mimi Zohar wrote:
On Tue, 2022-06-21 at 18:58 +0800, xiujianfeng wrote:
quoted
Hi, Ahmad

在 2022/6/7 14:06, Ahmad Fatoum 写道:
quoted
On 06.06.22 12:10, Xiu Jianfeng wrote:
quoted
Use IS_ENABLED(CONFIG_XXX) instead of #ifdef/#endif statements to
initialize .enabled, minor simplicity improvement.
The difference between using ifdef's and IS_ENABLED is when the
decision is made - build time, run time.   Please update the patch
description providing an explanation for needing to make the decision
at run time.

thanks,
IS_ENABLED() is a compile time constant.  So the patch looks fine to me.

- Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help