lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20160802113551.27065-1-baolex.ni@intel.com>
Date:	Tue,  2 Aug 2016 19:35:51 +0800
From:	Baole Ni <baolex.ni@...el.com>
To:	sathya.prakash@...adcom.com, chaitra.basappa@...adcom.com,
	suganath-prabu.subramani@...adcom.com, mchehab@...hat.com,
	m.chehab@...sung.com, pawel@...iak.com, m.szyprowski@...sung.com,
	kyungmin.park@...sung.com, k.kozlowski@...sung.com
Cc:	MPT-FusionLinux.pdl@...adcom.com, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org, chuansheng.liu@...el.com,
	baolex.ni@...el.com
Subject: [PATCH 0675/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/message/fusion/mptbase.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 5537f8d..43a9e1a3 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -101,13 +101,13 @@ MODULE_PARM_DESC(mpt_channel_mapping, " Mapping id's to channels (default=0)");
 static int mpt_debug_level;
 static int mpt_set_debug_level(const char *val, struct kernel_param *kp);
 module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int,
-		  &mpt_debug_level, 0600);
+		  &mpt_debug_level, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(mpt_debug_level,
 		 " debug level - refer to mptdebug.h - (default=0)");
 
 int mpt_fwfault_debug;
 EXPORT_SYMBOL(mpt_fwfault_debug);
-module_param(mpt_fwfault_debug, int, 0600);
+module_param(mpt_fwfault_debug, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(mpt_fwfault_debug,
 		 "Enable detection of Firmware fault and halt Firmware on fault - (default=0)");
 
-- 
2.9.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ