[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20160802120400.14861-1-baolex.ni@intel.com>
Date: Tue, 2 Aug 2016 20:04:00 +0800
From: Baole Ni <baolex.ni@...el.com>
To: gregkh@...uxfoundation.org, jslaby@...e.com, m.chehab@...sung.com,
m.szyprowski@...sung.com, kyungmin.park@...sung.com,
k.kozlowski@...sung.com
Cc: linux-kernel@...r.kernel.org, saurabh.truth@...il.com,
chuansheng.liu@...el.com, baolex.ni@...el.com,
wan.ahmad.zainie.wan.mohamad@...el.com, mail@...iej.szmigiero.name,
matwey@....msu.ru
Subject: [PATCH 0972/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>
---
drivers/tty/vt/keyboard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index f973bfc..a779f49 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -894,11 +894,11 @@ static void k_slock(struct vc_data *vc, unsigned char value, char up_flag)
/* by default, 300ms interval for combination release */
static unsigned brl_timeout = 300;
MODULE_PARM_DESC(brl_timeout, "Braille keys release delay in ms (0 for commit on first key release)");
-module_param(brl_timeout, uint, 0644);
+module_param(brl_timeout, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
static unsigned brl_nbchords = 1;
MODULE_PARM_DESC(brl_nbchords, "Number of chords that produce a braille pattern (0 for dead chords)");
-module_param(brl_nbchords, uint, 0644);
+module_param(brl_nbchords, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
static void k_brlcommit(struct vc_data *vc, unsigned int pattern, char up_flag)
{
--
2.9.2
Powered by blists - more mailing lists