mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0696/1285] Replace numeric parameter like 0444 with macro
@ 2016-08-02 11:37 Baole Ni
  0 siblings, 0 replies; only message in thread
From: Baole Ni @ 2016-08-02 11:37 UTC (permalink / raw)
  To: tony.olech, ulf.hansson, jirislaby, mchehab, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-mmc, linux-usb, linux-kernel, chuansheng.liu, baolex.ni,
	grundler, lporzio

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/mmc/host/vub300.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index 1e819f9..9abdc44 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -224,33 +224,33 @@ enum SD_RESPONSE_TYPE {
 #define REG(c) (0x01FFFF & (c->arg>>9))
 
 static bool limit_speed_to_24_MHz;
-module_param(limit_speed_to_24_MHz, bool, 0644);
+module_param(limit_speed_to_24_MHz, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(limit_speed_to_24_MHz, "Limit Max SDIO Clock Speed to 24 MHz");
 
 static bool pad_input_to_usb_pkt;
-module_param(pad_input_to_usb_pkt, bool, 0644);
+module_param(pad_input_to_usb_pkt, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(pad_input_to_usb_pkt,
 		 "Pad USB data input transfers to whole USB Packet");
 
 static bool disable_offload_processing;
-module_param(disable_offload_processing, bool, 0644);
+module_param(disable_offload_processing, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(disable_offload_processing, "Disable Offload Processing");
 
 static bool force_1_bit_data_xfers;
-module_param(force_1_bit_data_xfers, bool, 0644);
+module_param(force_1_bit_data_xfers, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(force_1_bit_data_xfers,
 		 "Force SDIO Data Transfers to 1-bit Mode");
 
 static bool force_polling_for_irqs;
-module_param(force_polling_for_irqs, bool, 0644);
+module_param(force_polling_for_irqs, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(force_polling_for_irqs, "Force Polling for SDIO interrupts");
 
 static int firmware_irqpoll_timeout = 1024;
-module_param(firmware_irqpoll_timeout, int, 0644);
+module_param(firmware_irqpoll_timeout, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(firmware_irqpoll_timeout, "VUB300 firmware irqpoll timeout");
 
 static int force_max_req_size = 128;
-module_param(force_max_req_size, int, 0644);
+module_param(force_max_req_size, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(force_max_req_size, "set max request size in kBytes");
 
 #ifdef SMSC_DEVELOPMENT_BOARD
@@ -259,7 +259,7 @@ static int firmware_rom_wait_states = 0x04;
 static int firmware_rom_wait_states = 0x1C;
 #endif
 
-module_param(firmware_rom_wait_states, int, 0644);
+module_param(firmware_rom_wait_states, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(firmware_rom_wait_states,
 		 "ROM wait states byte=RRRIIEEE (Reserved Internal External)");
 
-- 
2.9.2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-02 12:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-02 11:37 [PATCH 0696/1285] Replace numeric parameter like 0444 with macro Baole Ni

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®