[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20160802121331.21323-1-baolex.ni@intel.com>
Date: Tue, 2 Aug 2016 20:13:31 +0800
From: Baole Ni <baolex.ni@...el.com>
To: rusty@...tcorp.com.au, mingo@...hat.com, keescook@...omium.org,
tony.luck@...el.com, tomi.valkeinen@...com, m.chehab@...sung.com,
gregkh@...uxfoundation.org, m.szyprowski@...sung.com,
kyungmin.park@...sung.com, k.kozlowski@...sung.com
Cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
bp@...e.de, hidehiro.kawai.ez@...achi.com, mhocko@...e.com,
tglx@...utronix.de, vkuznets@...hat.com, pmladek@...e.com,
tj@...nel.org, jpoimboe@...hat.com, chuansheng.liu@...el.com,
baolex.ni@...el.com
Subject: [PATCH 1068/1285] Replace numeric parameter like 0444 with macro
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.
Signed-off-by: Chuansheng Liu <chuansheng.liu@...el.com>
Signed-off-by: Baole Ni <baolex.ni@...el.com>
---
kernel/panic.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/panic.c b/kernel/panic.c
index 8aa7449..c59cb05 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -568,9 +568,9 @@ EXPORT_SYMBOL(__stack_chk_fail);
#endif
-core_param(panic, panic_timeout, int, 0644);
-core_param(pause_on_oops, pause_on_oops, int, 0644);
-core_param(panic_on_warn, panic_on_warn, int, 0644);
+core_param(panic, panic_timeout, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+core_param(pause_on_oops, pause_on_oops, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+core_param(panic_on_warn, panic_on_warn, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
static int __init setup_crash_kexec_post_notifiers(char *s)
{
--
2.9.2
Powered by blists - more mailing lists