From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964799AbcHBM07 (ORCPT ); Tue, 2 Aug 2016 08:26:59 -0400 Received: from mga02.intel.com ([134.134.136.20]:26100 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934651AbcHBM0j (ORCPT ); Tue, 2 Aug 2016 08:26:39 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,460,1464678000"; d="scan'208";a="1006958112" From: Baole Ni To: jdmason@kudzu.us, dave.jiang@intel.com, Allen.Hubbe@emc.com, rjui@broadcom.com, sbranden@broadcom.com, m.chehab@samsung.com, pawel@osciak.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, k.kozlowski@samsung.com Cc: linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org, sudipm.mukherjee@gmail.com, john.kading@gd-ms.com, arnd@arndb.de, chuansheng.liu@intel.com, baolex.ni@intel.com Subject: [PATCH 0809/1285] Replace numeric parameter like 0444 with macro Date: Tue, 2 Aug 2016 19:48:38 +0800 Message-Id: <20160802114838.3900-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/ntb/test/ntb_perf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c index 8dfce9c..7c67b88 100644 --- a/drivers/ntb/test/ntb_perf.c +++ b/drivers/ntb/test/ntb_perf.c @@ -84,15 +84,15 @@ MODULE_DESCRIPTION(DRIVER_DESCRIPTION); static struct dentry *perf_debugfs_dir; static unsigned int seg_order = 19; /* 512K */ -module_param(seg_order, uint, 0644); +module_param(seg_order, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(seg_order, "size order [n^2] of buffer segment for testing"); static unsigned int run_order = 32; /* 4G */ -module_param(run_order, uint, 0644); +module_param(run_order, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(run_order, "size order [n^2] of total data to transfer"); static bool use_dma; /* default to 0 */ -module_param(use_dma, bool, 0644); +module_param(use_dma, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(use_dma, "Using DMA engine to measure performance"); struct perf_mw { -- 2.9.2