[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20160802111231.11471-1-baolex.ni@intel.com>
Date: Tue, 2 Aug 2016 19:12:31 +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, hverkuil@...all.nl,
a.hajda@...sung.com, bp@...en8.de
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
hans.verkuil@...co.com, arnd@...db.de, geliangtang@....com,
hdegoede@...hat.com, elfring@...rs.sourceforge.net,
chuansheng.liu@...el.com, baolex.ni@...el.com
Subject: [PATCH 0444/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/pci/bt8xx/bttv-driver.c | 62 +++++++++++++++++------------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index df54e17..9353226 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -107,37 +107,37 @@ static unsigned int coring;
static unsigned int v4l2 = 1;
/* insmod args */
-module_param(bttv_verbose, int, 0644);
-module_param(bttv_gpio, int, 0644);
-module_param(bttv_debug, int, 0644);
-module_param(irq_debug, int, 0644);
-module_param(debug_latency, int, 0644);
-module_param(disable_ir, int, 0444);
-
-module_param(fdsr, int, 0444);
-module_param(gbuffers, int, 0444);
-module_param(gbufsize, int, 0444);
-module_param(reset_crop, int, 0444);
-
-module_param(v4l2, int, 0644);
-module_param(bigendian, int, 0644);
-module_param(irq_iswitch, int, 0644);
-module_param(combfilter, int, 0444);
-module_param(lumafilter, int, 0444);
-module_param(automute, int, 0444);
-module_param(chroma_agc, int, 0444);
-module_param(agc_crush, int, 0444);
-module_param(whitecrush_upper, int, 0444);
-module_param(whitecrush_lower, int, 0444);
-module_param(vcr_hack, int, 0444);
-module_param(uv_ratio, int, 0444);
-module_param(full_luma_range, int, 0444);
-module_param(coring, int, 0444);
-
-module_param_array(radio, int, NULL, 0444);
-module_param_array(video_nr, int, NULL, 0444);
-module_param_array(radio_nr, int, NULL, 0444);
-module_param_array(vbi_nr, int, NULL, 0444);
+module_param(bttv_verbose, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(bttv_gpio, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(bttv_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(irq_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(debug_latency, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(disable_ir, int, S_IRUSR | S_IRGRP | S_IROTH);
+
+module_param(fdsr, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(gbuffers, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(gbufsize, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(reset_crop, int, S_IRUSR | S_IRGRP | S_IROTH);
+
+module_param(v4l2, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(bigendian, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(irq_iswitch, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(combfilter, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(lumafilter, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(automute, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(chroma_agc, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(agc_crush, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(whitecrush_upper, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(whitecrush_lower, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(vcr_hack, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(uv_ratio, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(full_luma_range, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(coring, int, S_IRUSR | S_IRGRP | S_IROTH);
+
+module_param_array(radio, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(video_nr, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(radio_nr, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(vbi_nr, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(radio, "The TV card supports radio, default is 0 (no)");
MODULE_PARM_DESC(bigendian, "byte order of the framebuffer, default is native endian");
--
2.9.2
Powered by blists - more mailing lists