[PATCH 0215/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 9fcd820..b8e5d3d 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -240,15 +240,15 @@ static int vmwgfx_pm_notifier(struct notifier_block *nb, 
unsigned long val,
  void *ptr);

 MODULE_PARM_DESC(enable_fbdev, "Enable vmwgfx fbdev");
-module_param_named(enable_fbdev, enable_fbdev, int, 0600);
+module_param_named(enable_fbdev, enable_fbdev, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(force_dma_api, "Force using the DMA API for TTM pages");
-module_param_named(force_dma_api, vmw_force_iommu, int, 0600);
+module_param_named(force_dma_api, vmw_force_iommu, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(restrict_iommu, "Try to limit IOMMU usage for TTM pages");
-module_param_named(restrict_iommu, vmw_restrict_iommu, int, 0600);
+module_param_named(restrict_iommu, vmw_restrict_iommu, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(force_coherent, "Force coherent TTM pages");
-module_param_named(force_coherent, vmw_force_coherent, int, 0600);
+module_param_named(force_coherent, vmw_force_coherent, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(restrict_dma_mask, "Restrict DMA mask to 44 bits with IOMMU");
-module_param_named(restrict_dma_mask, vmw_restrict_dma_mask, int, 0600);
+module_param_named(restrict_dma_mask, vmw_restrict_dma_mask, int, S_IRUSR | 
S_IWUSR);


 static void vmw_print_capabilities(uint32_t capabilities)
-- 
2.9.2



[PATCH 0214/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/virtio/virtgpu_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c 
b/drivers/gpu/drm/virtio/virtgpu_kms.c
index 4150873..1b7bd86 100644
--- a/drivers/gpu/drm/virtio/virtgpu_kms.c
+++ b/drivers/gpu/drm/virtio/virtgpu_kms.c
@@ -31,7 +31,7 @@
 static int virtio_gpu_fbdev = 1;

 MODULE_PARM_DESC(fbdev, "Disable/Enable framebuffer device & console");
-module_param_named(fbdev, virtio_gpu_fbdev, int, 0400);
+module_param_named(fbdev, virtio_gpu_fbdev, int, S_IRUSR);

 static void virtio_gpu_config_changed_work_func(struct work_struct *work)
 {
-- 
2.9.2



[PATCH 0213/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c 
b/drivers/gpu/drm/virtio/virtgpu_drv.c
index 3cc7afa..d40bc45 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.c
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
@@ -38,7 +38,7 @@ static struct drm_driver driver;
 static int virtio_gpu_modeset = -1;

 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
-module_param_named(modeset, virtio_gpu_modeset, int, 0400);
+module_param_named(modeset, virtio_gpu_modeset, int, S_IRUSR);

 static int virtio_gpu_probe(struct virtio_device *vdev)
 {
-- 
2.9.2



[PATCH 0212/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/sti/sti_mixer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c
index aed7801..6b1f7ae 100644
--- a/drivers/gpu/drm/sti/sti_mixer.c
+++ b/drivers/gpu/drm/sti/sti_mixer.c
@@ -14,7 +14,7 @@
 /* Module parameter to set the background color of the mixer */
 static unsigned int bkg_color = 0x00;
 MODULE_PARM_DESC(bkgcolor, "Value of the background color 0xRRGGBB");
-module_param_named(bkgcolor, bkg_color, int, 0644);
+module_param_named(bkgcolor, bkg_color, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);

 /* Identity: G=Y , B=Cb , R=Cr */
 static const u32 mixerColorSpaceMatIdentity[] = {
-- 
2.9.2



[PATCH 0211/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/radeon/radeon_drv.c | 64 ++---
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c 
b/drivers/gpu/drm/radeon/radeon_drv.c
index b55aa74..be6f5cc 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -203,100 +203,100 @@ int radeon_uvd = 1;
 int radeon_vce = 1;

 MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers");
-module_param_named(no_wb, radeon_no_wb, int, 0444);
+module_param_named(no_wb, radeon_no_wb, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
-module_param_named(modeset, radeon_modeset, int, 0400);
+module_param_named(modeset, radeon_modeset, int, S_IRUSR);

 MODULE_PARM_DESC(dynclks, "Disable/Enable dynamic clocks");
-module_param_named(dynclks, radeon_dynclks, int, 0444);
+module_param_named(dynclks, radeon_dynclks, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(r4xx_atom, "Enable ATOMBIOS modesetting for R4xx");
-module_param_named(r4xx_atom, radeon_r4xx_atom, int, 0444);
+module_param_named(r4xx_atom, radeon_r4xx_atom, int, S_IRUSR | S_IRGRP | 
S_IROTH);

 MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes");
-module_param_named(vramlimit, radeon_vram_limit, int, 0600);
+module_param_named(vramlimit, radeon_vram_limit, int, S_IRUSR | S_IWUSR);

 MODULE_PARM_DESC(agpmode, "AGP Mode (-1 == PCI)");
-module_param_named(agpmode, radeon_agpmode, int, 0444);
+module_param_named(agpmode, radeon_agpmode, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(gartsize, "Size of PCIE/IGP gart to setup in megabytes (32, 
64, etc., -1 = auto)");
-module_param_named(gartsize, radeon_gart_size, int, 0600);
+module_param_named(gartsize, radeon_gart_size, int, S_IRUSR | S_IWUSR);

 MODULE_PARM_DESC(benchmark, "Run benchmark");
-module_param_named(benchmark, radeon_benchmarking, int, 0444);
+module_param_named(benchmark, radeon_benchmarking, int, S_IRUSR | S_IRGRP | 
S_IROTH);

 MODULE_PARM_DESC(test, "Run tests");
-module_param_named(test, radeon_testing, int, 0444);
+module_param_named(test, radeon_testing, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(connector_table, "Force connector table");
-module_param_named(connector_table, radeon_connector_table, int, 0444);
+module_param_named(connector_table, radeon_connector_table, int, S_IRUSR | 
S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(tv, "TV enable (0 = disable)");
-module_param_named(tv, radeon_tv, int, 0444);
+module_param_named(tv, radeon_tv, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(audio, "Audio enable (-1 = auto, 0 = disable, 1 = enable)");
-module_param_named(audio, radeon_audio, int, 0444);
+module_param_named(audio, radeon_audio, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(disp_priority, "Display Priority (0 = auto, 1 = normal, 2 = 
high)");
-module_param_named(disp_priority, radeon_disp_priority, int, 0444);
+module_param_named(disp_priority, radeon_disp_priority, int, S_IRUSR | S_IRGRP 
| S_IROTH);

 MODULE_PARM_DESC(hw_i2c, "hw i2c engine enable (0 = disable)");
-module_param_named(hw_i2c, radeon_hw_i2c, int, 0444);
+module_param_named(hw_i2c, radeon_hw_i2c, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(pcie_gen2, "PCIE Gen2 mode (-1 = auto, 0 = disable, 1 = 
enable)");
-module_param_named(pcie_gen2, radeon_pcie_gen2, int, 0444);
+module_param_named(pcie_gen2, radeon_pcie_gen2, int, S_IRUSR | S_IRGRP | 
S_IROTH);

 MODULE_PARM_DESC(msi, "MSI support (1 = enable, 0 = disable, -1 = auto)");
-module_param_named(msi, radeon_msi, int, 0444);
+module_param_named(msi, radeon_msi, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms (default 1 = 10 
seconds, 0 = disable)");
-module_param_named(lockup_timeout, radeon_lockup_timeout, int, 0444);
+module_param_named(lockup_timeout, radeon_lockup_timeout, int, S_IRUSR | 
S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(fastfb, "Direct FB access for IGP chips (0 = disable, 1 = 
enable)");
-module_param_named(fastfb, radeon_fastfb, int, 0444);
+module_param_named(fastfb, radeon_fastfb, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(dpm, "DPM support (1 = enable, 0 = disable, -1 = auto)");
-module_param_named(dpm, radeon_dpm, int, 0444);
+module_param_named(dpm, radeon_dpm, int, S_IRUSR | S_

[PATCH 0210/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/qxl/qxl_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index dc9df5f..f62a099 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.c
+++ b/drivers/gpu/drm/qxl/qxl_drv.c
@@ -51,10 +51,10 @@ static int qxl_modeset = -1;
 int qxl_num_crtc = 4;

 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
-module_param_named(modeset, qxl_modeset, int, 0400);
+module_param_named(modeset, qxl_modeset, int, S_IRUSR);

 MODULE_PARM_DESC(num_heads, "Number of virtual crtcs to expose (default 4)");
-module_param_named(num_heads, qxl_num_crtc, int, 0400);
+module_param_named(num_heads, qxl_num_crtc, int, S_IRUSR);

 static struct drm_driver qxl_driver;
 static struct pci_driver qxl_pci_driver;
-- 
2.9.2



[PATCH 0209/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c 
b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index 89da41a..2f27751 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -24,7 +24,7 @@

 MODULE_PARM_DESC(ywrap, "Enable ywrap scrolling (omap44xx and later, default 
'y')");
 static bool ywrap_enabled = true;
-module_param_named(ywrap, ywrap_enabled, bool, 0644);
+module_param_named(ywrap, ywrap_enabled, bool, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);

 /*
  * fbdev funcs, to implement legacy fbdev interface on top of drm driver
-- 
2.9.2



[PATCH 0208/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/omapdrm/omap_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c 
b/drivers/gpu/drm/omapdrm/omap_drv.c
index d86f547..4e8b831 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -37,7 +37,7 @@
 static int num_crtc = CONFIG_DRM_OMAP_NUM_CRTCS;

 MODULE_PARM_DESC(num_crtc, "Number of overlays to use as CRTCs");
-module_param(num_crtc, int, 0600);
+module_param(num_crtc, int, S_IRUSR | S_IWUSR);

 /*
  * mode config funcs
-- 
2.9.2



[PATCH 0207/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c 
b/drivers/gpu/drm/omapdrm/dss/dsi.c
index 56c43f3..1678b7c 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -405,7 +405,7 @@ static const struct of_device_id dsi_of_match[];

 #ifdef DSI_PERF_MEASURE
 static bool dsi_perf;
-module_param(dsi_perf, bool, 0644);
+module_param(dsi_perf, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 #endif

 static inline struct dsi_data *dsi_get_dsidrv_data(struct platform_device 
*dsidev)
-- 
2.9.2



[PATCH 0206/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c 
b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 300ea03..33d60e5 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -53,7 +53,7 @@

 MODULE_PARM_DESC(nofbaccel, "Disable fbcon acceleration");
 int nouveau_nofbaccel = 0;
-module_param_named(nofbaccel, nouveau_nofbaccel, int, 0400);
+module_param_named(nofbaccel, nouveau_nofbaccel, int, S_IRUSR);

 static void
 nouveau_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
-- 
2.9.2



[PATCH 0205/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/nouveau/nouveau_drm.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c 
b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 11f8dd9..0a13c9a 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, S_IRUSR);

 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, S_IRUSR);

 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, S_IRUSR);

 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, S_IRUSR);

 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, int, 0400);
+module_param_named(runpm, nouveau_runtime_pm, int, S_IRUSR);

 static struct drm_driver driver_stub;
 static struct drm_driver driver_pci;
-- 
2.9.2



[PATCH 0204/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/nouveau/nouveau_connector.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c 
b/drivers/gpu/drm/nouveau/nouveau_connector.c
index c108408..689ee9e 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, S_IRUSR);

 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, S_IRUSR);

 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, S_IRUSR);

 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, S_IRUSR);

 struct nouveau_encoder *
 find_encoder(struct drm_connector *connector, int type)
-- 
2.9.2



[PATCH 0203/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/nouveau/nouveau_chan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c 
b/drivers/gpu/drm/nouveau/nouveau_chan.c
index b1d2527..6036456 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, S_IRUSR);

 int
 nouveau_channel_idle(struct nouveau_channel *chan)
-- 
2.9.2



[PATCH 0202/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c 
b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
index a665b78..42ed6f7 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, S_IRUSR);

 static uint32_t nv42_tv_sample_load(struct drm_encoder *encoder)
 {
-- 
2.9.2



[PATCH 0201/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/msm/msm_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 9c65409..9f5ddfb 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -51,7 +51,7 @@ int msm_register_mmu(struct drm_device *dev, struct msm_mmu 
*mmu)
 #ifdef CONFIG_DRM_MSM_REGISTER_LOGGING
 static bool reglog = false;
 MODULE_PARM_DESC(reglog, "Enable register read/write logging");
-module_param(reglog, bool, 0600);
+module_param(reglog, bool, S_IRUSR | S_IWUSR);
 #else
 #define reglog 0
 #endif
@@ -59,7 +59,7 @@ module_param(reglog, bool, 0600);
 #ifdef CONFIG_DRM_FBDEV_EMULATION
 static bool fbdev = true;
 MODULE_PARM_DESC(fbdev, "Enable fbdev compat layer");
-module_param(fbdev, bool, 0600);
+module_param(fbdev, bool, S_IRUSR | S_IWUSR);
 #endif

 static char *vram = "16m";
-- 
2.9.2



[PATCH 0200/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c 
b/drivers/gpu/drm/msm/adreno/adreno_device.c
index 5127b75..fdc7916 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_device.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
@@ -23,7 +23,7 @@

 bool hang_debug = false;
 MODULE_PARM_DESC(hang_debug, "Dump registers when hang is detected (can be 
slow!)");
-module_param_named(hang_debug, hang_debug, bool, 0600);
+module_param_named(hang_debug, hang_debug, bool, S_IRUSR | S_IWUSR);

 struct msm_gpu *a3xx_gpu_init(struct drm_device *dev);
 struct msm_gpu *a4xx_gpu_init(struct drm_device *dev);
-- 
2.9.2



[PATCH 0199/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c 
b/drivers/gpu/drm/mgag200/mgag200_drv.c
index ebb470f..e4b9d55 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.c
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
@@ -24,7 +24,7 @@
 int mgag200_modeset = -1;

 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
-module_param_named(modeset, mgag200_modeset, int, 0400);
+module_param_named(modeset, mgag200_modeset, int, S_IRUSR);

 static struct drm_driver driver;

-- 
2.9.2



[PATCH 0198/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/imx/imx-drm-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/imx/imx-drm-core.c 
b/drivers/gpu/drm/imx/imx-drm-core.c
index 8265665..8159ff2 100644
--- a/drivers/gpu/drm/imx/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/imx-drm-core.c
@@ -50,7 +50,7 @@ struct imx_drm_crtc {

 #if IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION)
 static int legacyfb_depth = 16;
-module_param(legacyfb_depth, int, 0444);
+module_param(legacyfb_depth, int, S_IRUSR | S_IRGRP | S_IROTH);
 #endif

 unsigned int imx_drm_crtc_id(struct imx_drm_crtc *crtc)
-- 
2.9.2



[PATCH 0197/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/i915/i915_params.c | 64 +++---
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_params.c 
b/drivers/gpu/drm/i915/i915_params.c
index 1779f02..7184e06 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -60,22 +60,22 @@ struct i915_params i915 __read_mostly = {
.inject_load_failure = 0,
 };

-module_param_named(modeset, i915.modeset, int, 0400);
+module_param_named(modeset, i915.modeset, int, S_IRUSR);
 MODULE_PARM_DESC(modeset,
"Use kernel modesetting [KMS] (0=disable, "
"1=on, -1=force vga console preference [default])");

-module_param_named_unsafe(panel_ignore_lid, i915.panel_ignore_lid, int, 0600);
+module_param_named_unsafe(panel_ignore_lid, i915.panel_ignore_lid, int, 
S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(panel_ignore_lid,
"Override lid status (0=autodetect, 1=autodetect disabled [default], "
"-1=force lid closed, -2=force lid open)");

-module_param_named_unsafe(semaphores, i915.semaphores, int, 0400);
+module_param_named_unsafe(semaphores, i915.semaphores, int, S_IRUSR);
 MODULE_PARM_DESC(semaphores,
"Use semaphores for inter-ring sync "
"(default: -1 (use per-chip defaults))");

-module_param_named_unsafe(enable_rc6, i915.enable_rc6, int, 0400);
+module_param_named_unsafe(enable_rc6, i915.enable_rc6, int, S_IRUSR);
 MODULE_PARM_DESC(enable_rc6,
"Enable power-saving render C-state 6. "
"Different stages can be selected via bitmask values "
@@ -83,82 +83,82 @@ MODULE_PARM_DESC(enable_rc6,
"For example, 3 would enable rc6 and deep rc6, and 7 would enable 
everything. "
"default: -1 (use per-chip default)");

-module_param_named_unsafe(enable_dc, i915.enable_dc, int, 0400);
+module_param_named_unsafe(enable_dc, i915.enable_dc, int, S_IRUSR);
 MODULE_PARM_DESC(enable_dc,
"Enable power-saving display C-states. "
"(-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6)");

-module_param_named_unsafe(enable_fbc, i915.enable_fbc, int, 0600);
+module_param_named_unsafe(enable_fbc, i915.enable_fbc, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(enable_fbc,
"Enable frame buffer compression for power savings "
"(default: -1 (use per-chip default))");

-module_param_named_unsafe(lvds_channel_mode, i915.lvds_channel_mode, int, 
0400);
+module_param_named_unsafe(lvds_channel_mode, i915.lvds_channel_mode, int, 
S_IRUSR);
 MODULE_PARM_DESC(lvds_channel_mode,
 "Specify LVDS channel mode "
 "(0=probe BIOS [default], 1=single-channel, 2=dual-channel)");

-module_param_named_unsafe(lvds_use_ssc, i915.panel_use_ssc, int, 0600);
+module_param_named_unsafe(lvds_use_ssc, i915.panel_use_ssc, int, S_IRUSR | 
S_IWUSR);
 MODULE_PARM_DESC(lvds_use_ssc,
"Use Spread Spectrum Clock with panels [LVDS/eDP] "
"(default: auto from VBT)");

-module_param_named_unsafe(vbt_sdvo_panel_type, i915.vbt_sdvo_panel_type, int, 
0400);
+module_param_named_unsafe(vbt_sdvo_panel_type, i915.vbt_sdvo_panel_type, int, 
S_IRUSR);
 MODULE_PARM_DESC(vbt_sdvo_panel_type,
"Override/Ignore selection of SDVO panel mode in the VBT "
"(-2=ignore, -1=auto [default], index in VBT BIOS table)");

-module_param_named_unsafe(reset, i915.reset, bool, 0600);
+module_param_named_unsafe(reset, i915.reset, bool, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(reset, "Attempt GPU resets (default: true)");

-module_param_named_unsafe(enable_hangcheck, i915.enable_hangcheck, bool, 0644);
+module_param_named_unsafe(enable_hangcheck, i915.enable_hangcheck, bool, 
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(enable_hangcheck,
"Periodically check GPU activity for detecting hangs. "
"WARNING: Disabling this can cause system wide hangs. "
"(default: true)");

-module_param_named_unsafe(enable_ppgtt, i915.enable_ppgtt, int, 0400);
+module_param_named_unsafe(enable_ppgtt, i915.enable_ppgtt, int, S_IRUSR);
 MODULE_PARM_DESC(enable_ppgtt,
"Override PPGTT usage. "
"(-1=auto [default], 0=disabled, 1=aliasing, 2=full, 3=full with 
extended address space)");

-module_param_named_unsafe(enable_execlists, i915.enable_execlists, int, 0400);
+module_param_name

[PATCH 0196/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/i2c/ch7006_drv.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c
index 0594c45..bfb4219 100644
--- a/drivers/gpu/drm/i2c/ch7006_drv.c
+++ b/drivers/gpu/drm/i2c/ch7006_drv.c
@@ -530,17 +530,17 @@ static void __exit ch7006_exit(void)
 }

 int ch7006_debug;
-module_param_named(debug, ch7006_debug, int, 0600);
+module_param_named(debug, ch7006_debug, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(debug, "Enable debug output.");

 char *ch7006_tv_norm;
-module_param_named(tv_norm, ch7006_tv_norm, charp, 0600);
+module_param_named(tv_norm, ch7006_tv_norm, charp, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(tv_norm, "Default TV norm.\n"
 "\t\tSupported: PAL, PAL-M, PAL-N, PAL-Nc, PAL-60, NTSC-M, 
NTSC-J.\n"
 "\t\tDefault: PAL");

 int ch7006_scale = 1;
-module_param_named(scale, ch7006_scale, int, 0600);
+module_param_named(scale, ch7006_scale, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(scale, "Default scale.\n"
 "\t\tSupported: 0 -> Select video modes with a higher blanking 
ratio.\n"
 "\t\t\t1 -> Select default video modes.\n"
-- 
2.9.2



[PATCH 0195/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/gma500/mdfld_dsi_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c 
b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
index 907cb51..67b5d18 100644
--- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
+++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
@@ -39,7 +39,7 @@
 static int LABC_control = 1;

 #ifdef MODULE
-module_param(LABC_control, int, 0644);
+module_param(LABC_control, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 #else

 static int __init parse_LABC_control(char *arg)
-- 
2.9.2



[PATCH 0194/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/exynos/exynos_drm_vidi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c 
b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index 608b0af..8f1bd21 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -269,7 +269,7 @@ static ssize_t vidi_store_connection(struct device *dev,
return len;
 }

-static DEVICE_ATTR(connection, 0644, vidi_show_connection,
+static DEVICE_ATTR(connection, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, 
vidi_show_connection,
vidi_store_connection);

 int vidi_connection_ioctl(struct drm_device *drm_dev, void *data,
-- 
2.9.2



[PATCH 0193/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c 
b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index ff6aa5d..b38929b 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -35,7 +35,7 @@ static const struct platform_device_id gpu_ids[] = {
 };

 static bool etnaviv_dump_core = true;
-module_param_named(dump_core, etnaviv_dump_core, bool, 0600);
+module_param_named(dump_core, etnaviv_dump_core, bool, S_IRUSR | S_IWUSR);

 /*
  * Driver functions:
-- 
2.9.2



[PATCH 0192/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c 
b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
index 3d4f56d..86b3bbd 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
@@ -26,7 +26,7 @@
 #ifdef CONFIG_DRM_ETNAVIV_REGISTER_LOGGING
 static bool reglog;
 MODULE_PARM_DESC(reglog, "Enable register read/write logging");
-module_param(reglog, bool, 0600);
+module_param(reglog, bool, S_IRUSR | S_IWUSR);
 #else
 #define reglog 0
 #endif
-- 
2.9.2



[PATCH 0191/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/drm_probe_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_probe_helper.c 
b/drivers/gpu/drm/drm_probe_helper.c
index 0329080..8fa1d7b 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -59,7 +59,7 @@
  */

 static bool drm_kms_helper_poll = true;
-module_param_named(poll, drm_kms_helper_poll, bool, 0600);
+module_param_named(poll, drm_kms_helper_poll, bool, S_IRUSR | S_IWUSR);

 static enum drm_mode_status
 drm_mode_validate_flag(const struct drm_display_mode *mode,
-- 
2.9.2



[PATCH 0190/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/drm_irq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 0fac801c..c1c0fd9 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -70,9 +70,9 @@ unsigned int drm_timestamp_monotonic = 1;

 static int drm_vblank_offdelay = 5000;/* Default to 5000 msecs. */

-module_param_named(vblankoffdelay, drm_vblank_offdelay, int, 0600);
-module_param_named(timestamp_precision_usec, drm_timestamp_precision, int, 
0600);
-module_param_named(timestamp_monotonic, drm_timestamp_monotonic, int, 0600);
+module_param_named(vblankoffdelay, drm_vblank_offdelay, int, S_IRUSR | 
S_IWUSR);
+module_param_named(timestamp_precision_usec, drm_timestamp_precision, int, 
S_IRUSR | S_IWUSR);
+module_param_named(timestamp_monotonic, drm_timestamp_monotonic, int, S_IRUSR 
| S_IWUSR);
 MODULE_PARM_DESC(vblankoffdelay, "Delay until vblank irq auto-disable [msecs] 
(0: never disable, <0: disable immediately)");
 MODULE_PARM_DESC(timestamp_precision_usec, "Max. error on timestamps [usecs]");
 MODULE_PARM_DESC(timestamp_monotonic, "Use monotonic timestamps");
-- 
2.9.2



[PATCH 0189/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/drm_fb_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 7c2eb75..3f15327 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -42,7 +42,7 @@
 #include 

 static bool drm_fbdev_emulation = true;
-module_param_named(fbdev_emulation, drm_fbdev_emulation, bool, 0600);
+module_param_named(fbdev_emulation, drm_fbdev_emulation, bool, S_IRUSR | 
S_IWUSR);
 MODULE_PARM_DESC(fbdev_emulation,
 "Enable legacy fbdev emulation [default=true]");

-- 
2.9.2



[PATCH 0188/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/drm_edid_load.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_edid_load.c b/drivers/gpu/drm/drm_edid_load.c
index 9a401ae..ff52104 100644
--- a/drivers/gpu/drm/drm_edid_load.c
+++ b/drivers/gpu/drm/drm_edid_load.c
@@ -27,7 +27,7 @@
 #include 

 static char edid_firmware[PATH_MAX];
-module_param_string(edid_firmware, edid_firmware, sizeof(edid_firmware), 0644);
+module_param_string(edid_firmware, edid_firmware, sizeof(edid_firmware), 
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(edid_firmware, "Do not probe monitor, use specified EDID blob 
"
"from built-in data or /lib/firmware instead. ");

-- 
2.9.2



[PATCH 0187/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/drm_edid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 7df26d4..60891eb 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1050,7 +1050,7 @@ int drm_edid_header_is_valid(const u8 *raw_edid)
 EXPORT_SYMBOL(drm_edid_header_is_valid);

 static int edid_fixup __read_mostly = 6;
-module_param_named(edid_fixup, edid_fixup, int, 0400);
+module_param_named(edid_fixup, edid_fixup, int, S_IRUSR);
 MODULE_PARM_DESC(edid_fixup,
 "Minimum number of valid EDID header bytes (0-8, default 6)");

-- 
2.9.2



[PATCH 0186/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/drm_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index bff8922..42314dd 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -54,7 +54,7 @@ MODULE_PARM_DESC(debug, "Enable debug output, where each bit 
enables a debug cat
 "\t\tBit 3 (0x08) will enable PRIME messages (prime code)\n"
 "\t\tBit 4 (0x10) will enable ATOMIC messages (atomic code)\n"
 "\t\tBit 5 (0x20) will enable VBL messages (vblank code)");
-module_param_named(debug, drm_debug, int, 0600);
+module_param_named(debug, drm_debug, int, S_IRUSR | S_IWUSR);

 static DEFINE_SPINLOCK(drm_minor_lock);
 static struct idr drm_minors_idr;
-- 
2.9.2



[PATCH 0185/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/drm_dp_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index eeaf5a7..694afc6 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -543,7 +543,7 @@ static int drm_dp_i2c_retry_count(const struct 
drm_dp_aux_msg *msg,
  * to require it. We should query/set the speed via DPCD if supported.
  */
 static int dp_aux_i2c_speed_khz __read_mostly = 10;
-module_param_unsafe(dp_aux_i2c_speed_khz, int, 0644);
+module_param_unsafe(dp_aux_i2c_speed_khz, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(dp_aux_i2c_speed_khz,
 "Assumed speed of the i2c bus in kHz, (1-400, default 10)");

@@ -691,7 +691,7 @@ static int drm_dp_i2c_drain_msg(struct drm_dp_aux *aux, 
struct drm_dp_aux_msg *o
  * succeed. Hence the default is maximum.
  */
 static int dp_aux_i2c_transfer_size __read_mostly = DP_AUX_MAX_PAYLOAD_BYTES;
-module_param_unsafe(dp_aux_i2c_transfer_size, int, 0644);
+module_param_unsafe(dp_aux_i2c_transfer_size, int, S_IRUSR | S_IWUSR | S_IRGRP 
| S_IROTH);
 MODULE_PARM_DESC(dp_aux_i2c_transfer_size,
 "Number of bytes to transfer in a single I2C over DP AUX CH 
message, (1-16, default 16)");

-- 
2.9.2



[PATCH 0184/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/cirrus/cirrus_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.c 
b/drivers/gpu/drm/cirrus/cirrus_drv.c
index dc83f69..b39a527 100644
--- a/drivers/gpu/drm/cirrus/cirrus_drv.c
+++ b/drivers/gpu/drm/cirrus/cirrus_drv.c
@@ -19,9 +19,9 @@ int cirrus_modeset = -1;
 int cirrus_bpp = 24;

 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
-module_param_named(modeset, cirrus_modeset, int, 0400);
+module_param_named(modeset, cirrus_modeset, int, S_IRUSR);
 MODULE_PARM_DESC(bpp, "Max bits-per-pixel (default:24)");
-module_param_named(bpp, cirrus_bpp, int, 0400);
+module_param_named(bpp, cirrus_bpp, int, S_IRUSR);

 /*
  * This is the generic driver code. This binds the driver to the drm core,
-- 
2.9.2



[PATCH 0183/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/bochs/bochs_kms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bochs/bochs_kms.c 
b/drivers/gpu/drm/bochs/bochs_kms.c
index 207a2cb..95feb47 100644
--- a/drivers/gpu/drm/bochs/bochs_kms.c
+++ b/drivers/gpu/drm/bochs/bochs_kms.c
@@ -11,8 +11,8 @@
 static int defx = 1024;
 static int defy = 768;

-module_param(defx, int, 0444);
-module_param(defy, int, 0444);
+module_param(defx, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(defy, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(defx, "default x resolution");
 MODULE_PARM_DESC(defy, "default y resolution");

-- 
2.9.2



[PATCH 0182/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/bochs/bochs_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bochs/bochs_drv.c 
b/drivers/gpu/drm/bochs/bochs_drv.c
index b332b4d3..1d69e5c 100644
--- a/drivers/gpu/drm/bochs/bochs_drv.c
+++ b/drivers/gpu/drm/bochs/bochs_drv.c
@@ -12,7 +12,7 @@
 #include "bochs.h"

 static bool enable_fbdev = true;
-module_param_named(fbdev, enable_fbdev, bool, 0444);
+module_param_named(fbdev, enable_fbdev, bool, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(fbdev, "register fbdev device");

 /* -- */
-- 
2.9.2



[PATCH 0181/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/ast/ast_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c
index fcd9c07..8c4bee4 100644
--- a/drivers/gpu/drm/ast/ast_drv.c
+++ b/drivers/gpu/drm/ast/ast_drv.c
@@ -36,7 +36,7 @@
 int ast_modeset = -1;

 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
-module_param_named(modeset, ast_modeset, int, 0400);
+module_param_named(modeset, ast_modeset, int, S_IRUSR);

 #define PCI_VENDOR_ASPEED 0x1a03

-- 
2.9.2



[PATCH 0180/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/amd/amdkfd/kfd_module.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_module.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
index 850a562..c052713 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_module.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
@@ -45,17 +45,17 @@ static const struct kgd2kfd_calls kgd2kfd = {
 };

 int sched_policy = KFD_SCHED_POLICY_HWS;
-module_param(sched_policy, int, 0444);
+module_param(sched_policy, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(sched_policy,
"Scheduling policy (0 = HWS (Default), 1 = HWS without 
over-subscription, 2 = Non-HWS (Used for debugging only)");

 int max_num_of_queues_per_device = KFD_MAX_NUM_OF_QUEUES_PER_DEVICE_DEFAULT;
-module_param(max_num_of_queues_per_device, int, 0444);
+module_param(max_num_of_queues_per_device, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(max_num_of_queues_per_device,
"Maximum number of supported queues per device (1 = Minimum, 4096 = 
default)");

 int send_sigterm;
-module_param(send_sigterm, int, 0444);
+module_param(send_sigterm, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(send_sigterm,
"Send sigterm to HSA process on unhandled exception (0 = disable, 1 = 
enable)");

-- 
2.9.2



[PATCH 0179/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
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 
Signed-off-by: Baole Ni 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 54 -
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index f888c01..f0c9c29 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -86,87 +86,87 @@ unsigned amdgpu_pcie_gen_cap = 0;
 unsigned amdgpu_pcie_lane_cap = 0;

 MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes");
-module_param_named(vramlimit, amdgpu_vram_limit, int, 0600);
+module_param_named(vramlimit, amdgpu_vram_limit, int, S_IRUSR | S_IWUSR);

 MODULE_PARM_DESC(gartsize, "Size of PCIE/IGP gart to setup in megabytes (32, 
64, etc., -1 = auto)");
-module_param_named(gartsize, amdgpu_gart_size, int, 0600);
+module_param_named(gartsize, amdgpu_gart_size, int, S_IRUSR | S_IWUSR);

 MODULE_PARM_DESC(benchmark, "Run benchmark");
-module_param_named(benchmark, amdgpu_benchmarking, int, 0444);
+module_param_named(benchmark, amdgpu_benchmarking, int, S_IRUSR | S_IRGRP | 
S_IROTH);

 MODULE_PARM_DESC(test, "Run tests");
-module_param_named(test, amdgpu_testing, int, 0444);
+module_param_named(test, amdgpu_testing, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(audio, "Audio enable (-1 = auto, 0 = disable, 1 = enable)");
-module_param_named(audio, amdgpu_audio, int, 0444);
+module_param_named(audio, amdgpu_audio, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(disp_priority, "Display Priority (0 = auto, 1 = normal, 2 = 
high)");
-module_param_named(disp_priority, amdgpu_disp_priority, int, 0444);
+module_param_named(disp_priority, amdgpu_disp_priority, int, S_IRUSR | S_IRGRP 
| S_IROTH);

 MODULE_PARM_DESC(hw_i2c, "hw i2c engine enable (0 = disable)");
-module_param_named(hw_i2c, amdgpu_hw_i2c, int, 0444);
+module_param_named(hw_i2c, amdgpu_hw_i2c, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(pcie_gen2, "PCIE Gen2 mode (-1 = auto, 0 = disable, 1 = 
enable)");
-module_param_named(pcie_gen2, amdgpu_pcie_gen2, int, 0444);
+module_param_named(pcie_gen2, amdgpu_pcie_gen2, int, S_IRUSR | S_IRGRP | 
S_IROTH);

 MODULE_PARM_DESC(msi, "MSI support (1 = enable, 0 = disable, -1 = auto)");
-module_param_named(msi, amdgpu_msi, int, 0444);
+module_param_named(msi, amdgpu_msi, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms (default 0 = 
disable)");
-module_param_named(lockup_timeout, amdgpu_lockup_timeout, int, 0444);
+module_param_named(lockup_timeout, amdgpu_lockup_timeout, int, S_IRUSR | 
S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(dpm, "DPM support (1 = enable, 0 = disable, -1 = auto)");
-module_param_named(dpm, amdgpu_dpm, int, 0444);
+module_param_named(dpm, amdgpu_dpm, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(smc_load_fw, "SMC firmware loading(1 = enable, 0 = disable)");
-module_param_named(smc_load_fw, amdgpu_smc_load_fw, int, 0444);
+module_param_named(smc_load_fw, amdgpu_smc_load_fw, int, S_IRUSR | S_IRGRP | 
S_IROTH);

 MODULE_PARM_DESC(aspm, "ASPM support (1 = enable, 0 = disable, -1 = auto)");
-module_param_named(aspm, amdgpu_aspm, int, 0444);
+module_param_named(aspm, amdgpu_aspm, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(runpm, "PX runtime pm (1 = force enable, 0 = disable, -1 = PX 
only default)");
-module_param_named(runpm, amdgpu_runtime_pm, int, 0444);
+module_param_named(runpm, amdgpu_runtime_pm, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(ip_block_mask, "IP Block Mask (all blocks enabled 
(default))");
-module_param_named(ip_block_mask, amdgpu_ip_block_mask, uint, 0444);
+module_param_named(ip_block_mask, amdgpu_ip_block_mask, uint, S_IRUSR | 
S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(bapm, "BAPM support (1 = enable, 0 = disable, -1 = auto)");
-module_param_named(bapm, amdgpu_bapm, int, 0444);
+module_param_named(bapm, amdgpu_bapm, int, S_IRUSR | S_IRGRP | S_IROTH);

 MODULE_PARM_DESC(deep_color, "Deep Color support (1 = enable, 0 = disable 
(default))");
-module_param_named(deep_color, amdgpu_deep_color, int, 0444);
+module_param_named(deep_color, amdgpu_deep_color, int, S_IRUSR | S_IRGRP | 
S_IROTH);

 MODULE_PARM_DESC(vm_size, "VM address space size in gigabytes (default 64GB)");
-module_param_named(vm_size, amdgpu_vm_size, int, 0444);
+module_param_named(vm_size, amdgpu_vm_size, int, S_IRUSR | S_I