From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968047AbcHBQt3 (ORCPT ); Tue, 2 Aug 2016 12:49:29 -0400 Received: from mga03.intel.com ([134.134.136.65]:14946 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933185AbcHBMAf (ORCPT ); Tue, 2 Aug 2016 08:00:35 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,459,1464678000"; d="scan'208";a="1028248913" From: Baole Ni To: oded.gabbay@gmail.com, alexander.deucher@amd.com, christian.koenig@amd.com, airlied@linux.ie, matt@codeblueprint.co.uk, m.chehab@samsung.com, lho@apm.com, dougthompson@xmission.com, bp@alien8.de Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, chuansheng.liu@intel.com, baolex.ni@intel.com, Flora.Cui@amd.com Subject: [PATCH 0180/1285] Replace numeric parameter like 0444 with macro Date: Tue, 2 Aug 2016 18:47:14 +0800 Message-Id: <20160802104714.25737-1-baolex.ni@intel.com> X-Mailer: git-send-email 2.9.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Baole Ni --- drivers/gpu/drm/amd/amdkfd/kfd_module.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_module.c b/drivers/gpu/drm/amd/amdkfd/kfd_module.c index 850a562..c052713 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_module.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_module.c @@ -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)"); -- 2.9.2