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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue,  2 Aug 2016 18:39:47 +0800
From:	Baole Ni <baolex.ni@...el.com>
To:	josh.h.morris@...ibm.com, pjk1939@...ux.vnet.ibm.com, pavel@....cz,
	gregkh@...uxfoundation.org, hpa@...or.com, x86@...nel.org
Cc:	linux-kernel@...r.kernel.org, chuansheng.liu@...el.com,
	baolex.ni@...el.com
Subject: [PATCH 0090/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/block/rsxx/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c
index 34997df..b2b8e40 100644
--- a/drivers/block/rsxx/core.c
+++ b/drivers/block/rsxx/core.c
@@ -49,11 +49,11 @@ MODULE_LICENSE("GPL");
 MODULE_VERSION(DRIVER_VERSION);
 
 static unsigned int force_legacy = NO_LEGACY;
-module_param(force_legacy, uint, 0444);
+module_param(force_legacy, uint, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(force_legacy, "Force the use of legacy type PCI interrupts");
 
 static unsigned int sync_start = 1;
-module_param(sync_start, uint, 0444);
+module_param(sync_start, uint, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(sync_start, "On by Default: Driver load will not complete "
 			     "until the card startup has completed.");
 
-- 
2.9.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ