mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baole Ni <baolex.ni@intel.com>
To: mchehab@kernel.org, maurochehab@gmail.com, mchehab@infradead.org,
	mchehab@redhat.com, m.chehab@samsung.com,
	maintainers@bluecherrydvr.com, andrey.utkin@corp.bluecherry.net,
	ismael@iodev.co.uk, bp@alien8.de
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	hans.verkuil@cisco.com, Julia.Lawall@lip6.fr,
	chuansheng.liu@intel.com, baolex.ni@intel.com,
	nenggun.kim@samsung.com, hdegoede@redhat.com
Subject: [PATCH 0507/1285] Replace numeric parameter like 0444 with macro
Date: Tue,  2 Aug 2016 19:19:05 +0800	[thread overview]
Message-ID: <20160802111905.15755-1-baolex.ni@intel.com> (raw)

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/ttpci/av7110.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c
index 382caf2..b51b3cd 100644
--- a/drivers/media/pci/ttpci/av7110.c
+++ b/drivers/media/pci/ttpci/av7110.c
@@ -89,30 +89,30 @@ static int wss_cfg_16_9 = 0x0007;
 static int tv_standard;
 static int full_ts;
 
-module_param_named(debug, av7110_debug, int, 0644);
+module_param_named(debug, av7110_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(debug, "debug level (bitmask, default 0)");
-module_param(vidmode, int, 0444);
+module_param(vidmode, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(vidmode,"analog video out: 0 off, 1 CVBS+RGB (default), 2 CVBS+YC, 3 YC");
-module_param(pids_off, int, 0444);
+module_param(pids_off, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(pids_off,"clear video/audio/PCR PID filters when demux is closed");
-module_param(adac, int, 0444);
+module_param(adac, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(adac,"audio DAC type: 0 TI, 1 CRYSTAL, 2 MSP (use if autodetection fails)");
-module_param(hw_sections, int, 0444);
+module_param(hw_sections, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(hw_sections, "0 use software section filter, 1 use hardware");
-module_param(rgb_on, int, 0444);
+module_param(rgb_on, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(rgb_on, "For Siemens DVB-C cards only: Enable RGB control"
 		" signal on SCART pin 16 to switch SCART video mode from CVBS to RGB");
-module_param(volume, int, 0444);
+module_param(volume, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(volume, "initial volume: default 255 (range 0-255)");
-module_param(budgetpatch, int, 0444);
+module_param(budgetpatch, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(budgetpatch, "use budget-patch hardware modification: default 0 (0 no, 1 autodetect, 2 always)");
-module_param(full_ts, int, 0444);
+module_param(full_ts, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(full_ts, "enable code for full-ts hardware modification: 0 disable (default), 1 enable");
-module_param(wss_cfg_4_3, int, 0444);
+module_param(wss_cfg_4_3, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(wss_cfg_4_3, "WSS 4:3 - default 0x4008 - bit 15: disable, 14: burst mode, 13..0: wss data");
-module_param(wss_cfg_16_9, int, 0444);
+module_param(wss_cfg_16_9, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(wss_cfg_16_9, "WSS 16:9 - default 0x0007 - bit 15: disable, 14: burst mode, 13..0: wss data");
-module_param(tv_standard, int, 0444);
+module_param(tv_standard, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(tv_standard, "TV standard: 0 PAL (default), 1 NTSC");
 
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
-- 
2.9.2

                 reply	other threads:[~2016-08-02 16:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160802111905.15755-1-baolex.ni@intel.com \
    --to=baolex.ni@intel.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=andrey.utkin@corp.bluecherry.net \
    --cc=bp@alien8.de \
    --cc=chuansheng.liu@intel.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hdegoede@redhat.com \
    --cc=ismael@iodev.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=maintainers@bluecherrydvr.com \
    --cc=maurochehab@gmail.com \
    --cc=mchehab@infradead.org \
    --cc=mchehab@kernel.org \
    --cc=mchehab@redhat.com \
    --cc=nenggun.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®