Replace numeric parameter like 0444 with macro
Subsystems (3)
PATCH 180/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 <[email protected]>
Signed-off-by Baole Ni <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_module.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_module.c +3 -3
@@ -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)" );
Signature · 1 line
2.9.2