[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20160802123204.1750-1-baolex.ni@intel.com>
Date: Tue, 2 Aug 2016 20:32:04 +0800
From: Baole Ni <baolex.ni@...el.com>
To: perex@...ex.cz, tiwai@...e.com, thierry.reding@...il.com,
gnurou@...il.com, kadlec@...ckhole.kfki.hu, davem@...emloft.net,
m.szyprowski@...sung.com, kyungmin.park@...sung.com,
k.kozlowski@...sung.com
Cc: alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
chuansheng.liu@...el.com, baolex.ni@...el.com,
aryabinin@...tuozzo.com
Subject: [PATCH 1257/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>
---
sound/pci/via82xx.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index 3dd038b..0d23ae7 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -88,30 +88,30 @@ static int dxs_support;
static int dxs_init_volume = 31;
static int nodelay;
-module_param(index, int, 0444);
+module_param(index, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge.");
-module_param(id, charp, 0444);
+module_param(id, charp, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(id, "ID string for VIA 82xx bridge.");
-module_param(mpu_port, long, 0444);
+module_param(mpu_port, long, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(mpu_port, "MPU-401 port. (VT82C686x only)");
#ifdef SUPPORT_JOYSTICK
-module_param(joystick, bool, 0444);
+module_param(joystick, bool, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(joystick, "Enable joystick. (VT82C686x only)");
#endif
-module_param(ac97_clock, int, 0444);
+module_param(ac97_clock, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz).");
-module_param(ac97_quirk, charp, 0444);
+module_param(ac97_quirk, charp, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
-module_param(dxs_support, int, 0444);
+module_param(dxs_support, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA, 5 = enable any sample rate)");
-module_param(dxs_init_volume, int, 0644);
+module_param(dxs_init_volume, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(dxs_init_volume, "initial DXS volume (0-31)");
-module_param(nodelay, int, 0444);
+module_param(nodelay, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(nodelay, "Disable 500ms init delay");
/* just for backward compatibility */
static bool enable;
-module_param(enable, bool, 0444);
+module_param(enable, bool, S_IRUSR | S_IRGRP | S_IROTH);
/* revision numbers for via686 */
--
2.9.2
Powered by blists - more mailing lists