From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030304AbcHBRqk (ORCPT ); Tue, 2 Aug 2016 13:46:40 -0400 Received: from mga02.intel.com ([134.134.136.20]:1666 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932264AbcHBLoE (ORCPT ); Tue, 2 Aug 2016 07:44:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,460,1464678000"; d="scan'208";a="743069101" From: Baole Ni To: dledford@redhat.com, sean.hefty@intel.com, hal.rosenstock@gmail.com, airlied@linux.ie, kgene@kernel.org, k.kozlowski@samsung.com, dougthompson@xmission.com, bp@alien8.de Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, ira.weiny@intel.com, sagi@grimberg.me, hch@infradead.org, matanb@mellanox.com, markb@mellanox.com, jgunthorpe@obsidianresearch.com, dean.luick@intel.com, chuansheng.liu@intel.com, baolex.ni@intel.com Subject: [PATCH 0252/1285] Replace numeric parameter like 0444 with macro Date: Tue, 2 Aug 2016 18:53:28 +0800 Message-Id: <20160802105328.30539-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/core/mad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 2d49228..d78e96f 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -52,9 +52,9 @@ static int mad_sendq_size = IB_MAD_QP_SEND_SIZE; static int mad_recvq_size = IB_MAD_QP_RECV_SIZE; -module_param_named(send_queue_size, mad_sendq_size, int, 0444); +module_param_named(send_queue_size, mad_sendq_size, int, S_IRUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(send_queue_size, "Size of send queue in number of work requests"); -module_param_named(recv_queue_size, mad_recvq_size, int, 0444); +module_param_named(recv_queue_size, mad_recvq_size, int, S_IRUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(recv_queue_size, "Size of receive queue in number of work requests"); static struct list_head ib_mad_port_list; -- 2.9.2