From: poma
Switch from "silly" S_* macros to "definitely more readable" octal "way"
permissions,
moreover to not "so restrictive" module parameters permissions.
Suggested-by: Ilia Mirkin
Fixes: poma
Tested-by: poma
---
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_chan.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_connector.c | 8 +++---
drivers/gpu/drm/nouveau/nouveau_debugfs.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_drm.c | 10
drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_hwmon.c | 40 ++---
7 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
index 163317d..2fa0d09 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
@@ -40,7 +40,7 @@ MODULE_PARM_DESC(tv_norm, "Default TV norm.\n"
"\t\tDefault: PAL\n"
"\t\t*NOTE* Ignored for cards with external TV encoders.");
static char *nouveau_tv_norm;
-module_param_named(tv_norm, nouveau_tv_norm, charp, 0400);
+module_param_named(tv_norm, nouveau_tv_norm, charp, 0444);
static uint32_t nv42_tv_sample_load(struct drm_encoder *encoder)
{
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c
b/drivers/gpu/drm/nouveau/nouveau_chan.c
index 879655c..6d2b9d9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_chan.c
+++ b/drivers/gpu/drm/nouveau/nouveau_chan.c
@@ -43,7 +43,7 @@
MODULE_PARM_DESC(vram_pushbuf, "Create DMA push buffers in VRAM");
int nouveau_vram_pushbuf;
-module_param_named(vram_pushbuf, nouveau_vram_pushbuf, int, 0400);
+module_param_named(vram_pushbuf, nouveau_vram_pushbuf, int, 0444);
int
nouveau_channel_idle(struct nouveau_channel *chan)
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c
b/drivers/gpu/drm/nouveau/nouveau_connector.c
index ae96ebc..1684d22 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -49,19 +49,19 @@
MODULE_PARM_DESC(tv_disable, "Disable TV-out detection");
int nouveau_tv_disable = 0;
-module_param_named(tv_disable, nouveau_tv_disable, int, 0400);
+module_param_named(tv_disable, nouveau_tv_disable, int, 0444);
MODULE_PARM_DESC(ignorelid, "Ignore ACPI lid status");
int nouveau_ignorelid = 0;
-module_param_named(ignorelid, nouveau_ignorelid, int, 0400);
+module_param_named(ignorelid, nouveau_ignorelid, int, 0444);
MODULE_PARM_DESC(duallink, "Allow dual-link TMDS (default: enabled)");
int nouveau_duallink = 1;
-module_param_named(duallink, nouveau_duallink, int, 0400);
+module_param_named(duallink, nouveau_duallink, int, 0444);
MODULE_PARM_DESC(hdmimhz, "Force a maximum HDMI pixel clock (in MHz)");
int nouveau_hdmimhz = 0;
-module_param_named(hdmimhz, nouveau_hdmimhz, int, 0400);
+module_param_named(hdmimhz, nouveau_hdmimhz, int, 0444);
struct nouveau_encoder *
find_encoder(struct drm_connector *connector, int type)
diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
index 3d0dc19..135e6c8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
+++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
@@ -204,7 +204,7 @@ nouveau_debugfs_create_file(struct drm_minor *minor,
node->minor = minor;
node->info_ent = (const void *)ndf->fops;
- node->dent = debugfs_create_file(ndf->name, S_IRUGO | S_IWUSR,
+ node->dent = debugfs_create_file(ndf->name, 0644,
minor->debugfs_root, node, ndf->fops);
if (!node->dent) {
kfree(node);
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c
b/drivers/gpu/drm/nouveau/nouveau_drm.c
index d06877d..2166bdc 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -63,24 +63,24 @@
MODULE_PARM_DESC(config, "option string to pass to driver core");
static char *nouveau_config;
-module_param_named(config, nouveau_config, charp, 0400);
+module_param_named(config, nouveau_config, charp, 0444);
MODULE_PARM_DESC(debug, "debug string to pass to driver core");
static char *nouveau_debug;
-module_param_named(debug, nouveau_debug, charp, 0400);
+module_param_named(debug, nouveau_debug, charp, 0444);
MODULE_PARM_DESC(noaccel, "disable kernel/abi16 acceleration");
static int nouveau_noaccel = 0;
-module_param_named(noaccel, nouveau_noaccel, int, 0400);
+module_param_named(noaccel, nouveau_noaccel, int, 0444);
MODULE_PARM_DESC(modeset, "enable driver (default: auto, "
"0 = disabled, 1 = enabled, 2 = headless)");
int nouveau_modeset = -1;
-module_param_named(modeset, nouveau_modeset, int, 0400);
+module_param_named(modeset, nouveau_modeset, int, 0444);
MODULE_PARM_DESC(runpm, "disable (0), force enable (1), optimus only default
(-1)");
int nouveau_runtime_pm = -1;
-module_param_named(runpm, nouveau_runtime_pm,