Skip to contentSkip to conversation

Replace numeric parameter like 0444 with macro

PATCH NAK Baole Ni 4 participants 4 messages Aug 2, 2016 NVMe

lore
Share & tools
lore

Baole Ni

author
#0 lore raw

PATCH 812/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 at intel.com>
Signed-off-by Baole Ni <baolex.ni at intel.com>
---
 drivers/nvme/host/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/pci.c +1 -1
index befac5b..c7bcf34 100644
@@ -60,7 +60,7 @@ static int use_threaded_interrupts;
 module_param(use_threaded_interrupts, int, 0);
 
 static bool use_cmb_sqes = true;
-module_param(use_cmb_sqes, bool, 0644);
+module_param(use_cmb_sqes, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(use_cmb_sqes, "use controller's memory buffer for I/O SQes");
 
 static struct workqueue_struct *nvme_workq;
Signature · 1 line
2.9.2
maintainer
#1 lore raw

I assume that you didn't try to send a 1285 patches set :)

I think you can safely squash the two patches together.

#2 lore raw
Quoted 1 line · Sagi Grimberg

I assume that you didn't try to send a 1285 patches set :)

No he actually did. And some of us were unfortunate enough to be Cc'd on a hundred of them.

Quoted 2 lines

I think you can safely squash the two patches together.

I've NAKed all patches I was Cc'd on. IMNSHO the change makes it less readable and more error prone.

-- Steve

#3 lore raw
Quoted 2 lines · Steven Rostedt

No he actually did. And some of us were unfortunate enough to be Cc'd on a hundred of them.

Lucky you, I got 400 and it is still counting...

Signature · 5 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--