[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20160802120412.14996-1-baolex.ni@intel.com>
Date: Tue, 2 Aug 2016 20:04:12 +0800
From: Baole Ni <baolex.ni@...el.com>
To: castet.matthieu@...e.fr, stf_xl@...pl, gregkh@...uxfoundation.org,
m.chehab@...sung.com, m.szyprowski@...sung.com,
kyungmin.park@...sung.com, k.kozlowski@...sung.com
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
chuansheng.liu@...el.com, baolex.ni@...el.com,
wan.ahmad.zainie.wan.mohamad@...el.com, mail@...iej.szmigiero.name,
matwey@....msu.ru
Subject: [PATCH 0974/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/usb/atm/ueagle-atm.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index 4333dc5..64b6616 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -573,17 +573,17 @@ static bool sync_wait[NB_MODEM];
static char *cmv_file[NB_MODEM];
static int annex[NB_MODEM];
-module_param(debug, uint, 0644);
+module_param(debug, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(debug, "module debug level (0=off,1=on,2=verbose)");
-module_param_array(altsetting, uint, NULL, 0644);
+module_param_array(altsetting, uint, NULL, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(altsetting, "alternate setting for incoming traffic: 0=bulk, "
"1=isoc slowest, ... , 8=isoc fastest (default)");
-module_param_array(sync_wait, bool, NULL, 0644);
+module_param_array(sync_wait, bool, NULL, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(sync_wait, "wait the synchronisation before starting ATM");
-module_param_array(cmv_file, charp, NULL, 0644);
+module_param_array(cmv_file, charp, NULL, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(cmv_file,
"file name with configuration and management variables");
-module_param_array(annex, uint, NULL, 0644);
+module_param_array(annex, uint, NULL, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(annex,
"manually set annex a/b (0=auto, 1=annex a, 2=annex b)");
--
2.9.2
Powered by blists - more mailing lists