Replace numeric parameter like 0444 with macro
PATCH 111/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/char/tpm/tpm-interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm-interface.c +1 -1
@@ -44,7 +44,7 @@* with an extend to the selected _unused_ non-volatile pcr. */ static int tpm_suspend_pcr; -module_param_named (suspend_pcr, tpm_suspend_pcr, uint,0644 ); +module_param_named (suspend_pcr, tpm_suspend_pcr, uint,S_IRUSR |S_IWUSR |S_IRGRP |S_IROTH );MODULE_PARM_DESC (suspend_pcr,"PCR to use for dummy writes to faciltate flush on suspend." );
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]>
I choose to ignore this and other similar patches you have submitted for the TPM driver subsystem.
/Jarkko