* [PATCH] mm/secretmem: Bool type variables should be initialized with true
@ 2025-02-07 7:42 Liu Ye
2025-02-07 9:01 ` Dev Jain
0 siblings, 1 reply; 2+ messages in thread
From: Liu Ye @ 2025-02-07 7:42 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, linux-kernel, Liu Ye
The variable secretmem_enable is initialized with 1, which is an integer.
It would be more appropriate to use true for better readability and
consistency with the bool type.
Signed-off-by: Liu Ye <liuye@kylinos.cn>
---
mm/secretmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/secretmem.c b/mm/secretmem.c
index 1b0a214ee558..2f9442d6633d 100644
--- a/mm/secretmem.c
+++ b/mm/secretmem.c
@@ -35,7 +35,7 @@
#define SECRETMEM_MODE_MASK (0x0)
#define SECRETMEM_FLAGS_MASK SECRETMEM_MODE_MASK
-static bool secretmem_enable __ro_after_init = 1;
+static bool secretmem_enable __ro_after_init = true;
module_param_named(enable, secretmem_enable, bool, 0400);
MODULE_PARM_DESC(secretmem_enable,
"Enable secretmem and memfd_secret(2) system call");
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mm/secretmem: Bool type variables should be initialized with true
2025-02-07 7:42 [PATCH] mm/secretmem: Bool type variables should be initialized with true Liu Ye
@ 2025-02-07 9:01 ` Dev Jain
0 siblings, 0 replies; 2+ messages in thread
From: Dev Jain @ 2025-02-07 9:01 UTC (permalink / raw)
To: Liu Ye, akpm; +Cc: linux-mm, linux-kernel
On 07/02/25 1:12 pm, Liu Ye wrote:
> The variable secretmem_enable is initialized with 1, which is an integer.
> It would be more appropriate to use true for better readability and
At the cost of messing up the git log. Please don't send trivial
cosmetic changes.
> consistency with the bool type.
>
> Signed-off-by: Liu Ye <liuye@kylinos.cn>
> ---
> mm/secretmem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/secretmem.c b/mm/secretmem.c
> index 1b0a214ee558..2f9442d6633d 100644
> --- a/mm/secretmem.c
> +++ b/mm/secretmem.c
> @@ -35,7 +35,7 @@
> #define SECRETMEM_MODE_MASK (0x0)
> #define SECRETMEM_FLAGS_MASK SECRETMEM_MODE_MASK
>
> -static bool secretmem_enable __ro_after_init = 1;
> +static bool secretmem_enable __ro_after_init = true;
> module_param_named(enable, secretmem_enable, bool, 0400);
> MODULE_PARM_DESC(secretmem_enable,
> "Enable secretmem and memfd_secret(2) system call");
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-07 9:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-07 7:42 [PATCH] mm/secretmem: Bool type variables should be initialized with true Liu Ye
2025-02-07 9:01 ` Dev Jain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox