Replace numeric parameter like 0444 with macro
PATCH 829/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.
--- drivers/pcmcia/cistpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pcmcia/cistpl.c +1 -1
@@ -57,7 +57,7 @@ static const u_int exponent[] = {/* 16-bit CIS? */ static int cis_width; -module_param (cis_width, int,0444 ); +module_param (cis_width, int,S_IRUSR |S_IRGRP |S_IROTH );void release_cis_mem (struct pcmcia_socket *s) {
Signature · 1 line
2.9.2
Quoted 8 lines · 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 <[email protected]>Signed-off-by Baole Ni <[email protected]>
This is the worst series of lkml spam I've ever received!
1. Make something like this a series in one thread, not 1285 single threads! Add a cover letter.
2. Don't write one patch per source file, one per subsystem is enough. Maybe even better: make a tree-wide patch using Coccinelle.
3. Use better subjects. I want to see the subsystem the patch is modifying.
4. Use _correct_ maintainers. WTF do I have to do with pcmcia?
Juergen
Quoted 8 lines · 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 <[email protected]>Signed-off-by Baole Ni <[email protected]>
I'm not sure how much these changes improve robustness and/or readability, but they cause no harm. For that reason, the changes in rtlwifi drivers is acked.
Larry
Quoted 18 lines
--- drivers/pcmcia/cistpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pcmcia/cistpl.c +1
-1@@ -57,7 +57,7 @@ static const u_int exponent[] = {/* 16-bit CIS? */ static int cis_width; -module_param (cis_width, int,0444 ); +module_param (cis_width, int,S_IRUSR |S_IRGRP |S_IROTH );void release_cis_mem (struct pcmcia_socket *s) {