[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20160802114838.3900-1-baolex.ni@intel.com>
Date: Tue, 2 Aug 2016 19:48:38 +0800
From: Baole Ni <baolex.ni@...el.com>
To: jdmason@...zu.us, dave.jiang@...el.com, Allen.Hubbe@....com,
rjui@...adcom.com, sbranden@...adcom.com, m.chehab@...sung.com,
pawel@...iak.com, m.szyprowski@...sung.com,
kyungmin.park@...sung.com, k.kozlowski@...sung.com
Cc: linux-ntb@...glegroups.com, linux-kernel@...r.kernel.org,
sudipm.mukherjee@...il.com, john.kading@...ms.com, arnd@...db.de,
chuansheng.liu@...el.com, baolex.ni@...el.com
Subject: [PATCH 0809/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/ntb/test/ntb_perf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
index 8dfce9c..7c67b88 100644
--- a/drivers/ntb/test/ntb_perf.c
+++ b/drivers/ntb/test/ntb_perf.c
@@ -84,15 +84,15 @@ MODULE_DESCRIPTION(DRIVER_DESCRIPTION);
static struct dentry *perf_debugfs_dir;
static unsigned int seg_order = 19; /* 512K */
-module_param(seg_order, uint, 0644);
+module_param(seg_order, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(seg_order, "size order [n^2] of buffer segment for testing");
static unsigned int run_order = 32; /* 4G */
-module_param(run_order, uint, 0644);
+module_param(run_order, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(run_order, "size order [n^2] of total data to transfer");
static bool use_dma; /* default to 0 */
-module_param(use_dma, bool, 0644);
+module_param(use_dma, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(use_dma, "Using DMA engine to measure performance");
struct perf_mw {
--
2.9.2
Powered by blists - more mailing lists