[PATCH 0563/1285] Replace numeric parameter like 0444 with macro

From: Baole Ni
Date: Tue Aug 02 2016 - 08:03:26 EST


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@xxxxxxxxx>
Signed-off-by: Baole Ni <baolex.ni@xxxxxxxxx>
---
drivers/media/tuners/tda9887.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/tuners/tda9887.c b/drivers/media/tuners/tda9887.c
index 56be6c2..057d885 100644
--- a/drivers/media/tuners/tda9887.c
+++ b/drivers/media/tuners/tda9887.c
@@ -21,7 +21,7 @@
*/

static int debug;
-module_param(debug, int, 0644);
+module_param(debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(debug, "enable verbose debug messages");

static DEFINE_MUTEX(tda9887_list_mutex);
@@ -434,10 +434,10 @@ static unsigned int port2 = UNSET;
static unsigned int qss = UNSET;
static unsigned int adjust = UNSET;

-module_param(port1, int, 0644);
-module_param(port2, int, 0644);
-module_param(qss, int, 0644);
-module_param(adjust, int, 0644);
+module_param(port1, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(port2, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(qss, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(adjust, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);

static int tda9887_set_insmod(struct dvb_frontend *fe)
{
--
2.9.2