From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933614AbcHBQs4 (ORCPT ); Tue, 2 Aug 2016 12:48:56 -0400 Received: from mga01.intel.com ([192.55.52.88]:61754 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932891AbcHBMAg (ORCPT ); Tue, 2 Aug 2016 08:00:36 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,460,1464678000"; d="scan'208";a="1018192438" From: Baole Ni To: faisal.latif@intel.com, chien.tin.tung@intel.com, mustafa.ismail@intel.com, shiraz.saleem@intel.com, tatyana.e.nikolova@intel.com, dledford@redhat.com, sean.hefty@intel.com, hal.rosenstock@gmail.com, bp@alien8.de Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, chuansheng.liu@intel.com, baolex.ni@intel.com, hch@infradead.org, matanb@mellanox.com, markb@mellanox.com, jgunthorpe@obsidianresearch.com, dean.luick@intel.com Subject: [PATCH 0259/1285] Replace numeric parameter like 0444 with macro Date: Tue, 2 Aug 2016 18:54:08 +0800 Message-Id: <20160802105408.31006-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/infiniband/hw/i40iw/i40iw_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c index c963cad..55da11a 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_main.c +++ b/drivers/infiniband/hw/i40iw/i40iw_main.c @@ -55,23 +55,23 @@ __stringify(DRV_VERSION_MINOR) "." __stringify(DRV_VERSION_BUILD) static int push_mode; -module_param(push_mode, int, 0644); +module_param(push_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(push_mode, "Low latency mode: 0=disabled (default), 1=enabled)"); static int debug; -module_param(debug, int, 0644); +module_param(debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(debug, "debug flags: 0=disabled (default), 0x7fffffff=all"); static int resource_profile; -module_param(resource_profile, int, 0644); +module_param(resource_profile, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(resource_profile, "Resource Profile: 0=no VF RDMA support (default), 1=Weighted VF, 2=Even Distribution"); static int max_rdma_vfs = 32; -module_param(max_rdma_vfs, int, 0644); +module_param(max_rdma_vfs, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(max_rdma_vfs, "Maximum VF count: 0-32 32=default"); static int mpa_version = 2; -module_param(mpa_version, int, 0644); +module_param(mpa_version, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(mpa_version, "MPA version to be used in MPA Req/Resp 1 or 2"); MODULE_AUTHOR("Intel Corporation, "); -- 2.9.2