From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756717AbcHBO3Y (ORCPT ); Tue, 2 Aug 2016 10:29:24 -0400 Received: from mga04.intel.com ([192.55.52.120]:43557 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965528AbcHBMwW (ORCPT ); Tue, 2 Aug 2016 08:52:22 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,460,1464678000"; d="scan'208";a="1033607146" From: Baole Ni To: rusty@rustcorp.com.au, mingo@redhat.com, keescook@chromium.org, tony.luck@intel.com, tomi.valkeinen@ti.com, m.chehab@samsung.com, gregkh@linuxfoundation.org, m.szyprowski@samsung.com, kyungmin.park@samsung.com, k.kozlowski@samsung.com Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, bp@suse.de, hidehiro.kawai.ez@hitachi.com, mhocko@suse.com, tglx@linutronix.de, vkuznets@redhat.com, pmladek@suse.com, tj@kernel.org, jpoimboe@redhat.com, chuansheng.liu@intel.com, baolex.ni@intel.com Subject: [PATCH 1068/1285] Replace numeric parameter like 0444 with macro Date: Tue, 2 Aug 2016 20:13:31 +0800 Message-Id: <20160802121331.21323-1-baolex.ni@intel.com> X-Mailer: git-send-email 2.9.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Baole Ni --- 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