lkml.org 
[lkml]   [2016]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 0443/1285] Replace numeric parameter like 0444 with macro
Date
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@intel.com>
Signed-off-by: Baole Ni <baolex.ni@intel.com>
---
drivers/media/pci/bt8xx/bttv-cards.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/media/pci/bt8xx/bttv-cards.c b/drivers/media/pci/bt8xx/bttv-cards.c
index 8a17cc0..a84caf4 100644
--- a/drivers/media/pci/bt8xx/bttv-cards.c
+++ b/drivers/media/pci/bt8xx/bttv-cards.c
@@ -109,21 +109,21 @@ static unsigned int audioall = UNSET;
static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };

/* insmod options */
-module_param(triton1, int, 0444);
-module_param(vsfx, int, 0444);
-module_param(no_overlay, int, 0444);
-module_param(latency, int, 0444);
-module_param(gpiomask, int, 0444);
-module_param(audioall, int, 0444);
-module_param(autoload, int, 0444);
-
-module_param_array(card, int, NULL, 0444);
-module_param_array(pll, int, NULL, 0444);
-module_param_array(tuner, int, NULL, 0444);
-module_param_array(svhs, int, NULL, 0444);
-module_param_array(remote, int, NULL, 0444);
-module_param_array(audiodev, int, NULL, 0444);
-module_param_array(audiomux, int, NULL, 0444);
+module_param(triton1, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(vsfx, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(no_overlay, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(latency, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(gpiomask, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(audioall, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(autoload, int, S_IRUSR | S_IRGRP | S_IROTH);
+
+module_param_array(card, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(pll, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(tuner, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(svhs, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(remote, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(audiodev, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(audiomux, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);

MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
"[enable bug compatibility for triton1 + others]");
--
2.9.2
\
 
 \ /
  Last update: 2016-08-02 14:41    [W:0.242 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site