From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965120AbcHBOq0 (ORCPT ); Tue, 2 Aug 2016 10:46:26 -0400 Received: from mga09.intel.com ([134.134.136.24]:38072 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935104AbcHBMnE (ORCPT ); Tue, 2 Aug 2016 08:43:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,460,1464678000"; d="scan'208";a="1028283564" From: Baole Ni To: gregkh@linuxfoundation.org, dsd@laptop.org, jon.nettleton@gmail.com, m.chehab@samsung.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, k.kozlowski@samsung.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com, luisbg@osg.samsung.com, shivanib134@gmail.com, punitvara@gmail.com, joseph.bisch@gmail.com, bhaktipriya96@gmail.com, chuansheng.liu@intel.com, baolex.ni@intel.com Subject: [PATCH 0953/1285] Replace numeric parameter like 0444 with macro Date: Tue, 2 Aug 2016 20:02:14 +0800 Message-Id: <20160802120214.13574-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/staging/rtl8712/os_intfs.c | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c index 57211f7..d62009c 100644 --- a/drivers/staging/rtl8712/os_intfs.c +++ b/drivers/staging/rtl8712/os_intfs.c @@ -98,26 +98,26 @@ static char *initmac; static int wifi_test; module_param_string(ifname, ifname, sizeof(ifname), S_IRUGO | S_IWUSR); -module_param(wifi_test, int, 0644); -module_param(initmac, charp, 0644); -module_param(video_mode, int, 0644); -module_param(chip_version, int, 0644); -module_param(rfintfs, int, 0644); -module_param(lbkmode, int, 0644); -module_param(hci, int, 0644); -module_param(network_mode, int, 0644); -module_param(channel, int, 0644); -module_param(mp_mode, int, 0644); -module_param(wmm_enable, int, 0644); -module_param(vrtl_carrier_sense, int, 0644); -module_param(vcs_type, int, 0644); -module_param(busy_thresh, int, 0644); -module_param(ht_enable, int, 0644); -module_param(cbw40_enable, int, 0644); -module_param(ampdu_enable, int, 0644); -module_param(rf_config, int, 0644); -module_param(power_mgnt, int, 0644); -module_param(low_power, int, 0644); +module_param(wifi_test, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(initmac, charp, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(video_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(chip_version, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(rfintfs, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(lbkmode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(hci, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(network_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(channel, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(mp_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(wmm_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(vrtl_carrier_sense, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(vcs_type, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(busy_thresh, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(ht_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(cbw40_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(ampdu_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(rf_config, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(power_mgnt, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(low_power, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(ifname, " Net interface name, wlan%d=default"); MODULE_PARM_DESC(initmac, "MAC-Address, default: use FUSE"); -- 2.9.2