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 19:26:15 +0800
From:	Baole Ni <baolex.ni@...el.com>
To:	mchehab@...nel.org, maurochehab@...il.com, mchehab@...radead.org,
	mchehab@...hat.com, m.chehab@...sung.com, mkrufky@...uxtv.org,
	s.nawrocki@...sung.com, kgene@...nel.org, k.kozlowski@...sung.com
Cc:	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
	hans.verkuil@...co.com, sudipm.mukherjee@...il.com,
	Julia.Lawall@...6.fr, wuninsu@...il.com, chuansheng.liu@...el.com,
	baolex.ni@...el.com
Subject: [PATCH 0577/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/media/usb/cx231xx/cx231xx-417.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
index 00da024..c0cc2d4 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -73,20 +73,20 @@
 #define  MCI_MODE_MEMORY_WRITE          0x4000
 
 static unsigned int mpegbufs = 8;
-module_param(mpegbufs, int, 0644);
+module_param(mpegbufs, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(mpegbufs, "number of mpeg buffers, range 2-32");
 
 static unsigned int mpeglines = 128;
-module_param(mpeglines, int, 0644);
+module_param(mpeglines, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(mpeglines, "number of lines in an MPEG buffer, range 2-32");
 
 static unsigned int mpeglinesize = 512;
-module_param(mpeglinesize, int, 0644);
+module_param(mpeglinesize, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(mpeglinesize,
 	"number of bytes in each line of an MPEG buffer, range 512-1024");
 
 static unsigned int v4l_debug = 1;
-module_param(v4l_debug, int, 0644);
+module_param(v4l_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(v4l_debug, "enable V4L debug messages");
 
 #define dprintk(level, fmt, arg...)	\
-- 
2.9.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ