Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1455025 > unrolled thread
| Started by | Baole Ni <baolex.ni@intel.com> |
|---|---|
| First post | 2016-08-02 19:00 +0200 |
| Last post | 2016-08-02 19:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0444/1285] Replace numeric parameter like 0444 with macro Baole Ni <baolex.ni@intel.com> - 2016-08-02 19:00 +0200
| From | Baole Ni <baolex.ni@intel.com> |
|---|---|
| Date | 2016-08-02 19:00 +0200 |
| Subject | [PATCH 0444/1285] Replace numeric parameter like 0444 with macro |
| Message-ID | <s1LcW-77c-17@gated-at.bofh.it> |
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-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
Back to top | Article view | linux.kernel
csiph-web