From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934282AbcHBQnC (ORCPT ); Tue, 2 Aug 2016 12:43:02 -0400 Received: from mga09.intel.com ([134.134.136.24]:9643 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933633AbcHBMBk (ORCPT ); Tue, 2 Aug 2016 08:01:40 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,459,1464678000"; d="scan'208";a="1033566847" From: Baole Ni To: stefanr@s5r6.in-berlin.de, maurochehab@gmail.com, mchehab@infradead.org, mchehab@redhat.com, m.chehab@samsung.com, lho@apm.com, dougthompson@xmission.com, bp@alien8.de Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, chuansheng.liu@intel.com, baolex.ni@intel.com, lee.jones@linaro.org Subject: [PATCH 0165/1285] Replace numeric parameter like 0444 with macro Date: Tue, 2 Aug 2016 18:45:54 +0800 Message-Id: <20160802104554.24738-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/firewire/ohci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 8bf8926..39f952b 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -347,7 +347,7 @@ static const struct { /* This overrides anything that was found in ohci_quirks[]. */ static int param_quirks; -module_param_named(quirks, param_quirks, int, 0644); +module_param_named(quirks, param_quirks, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(quirks, "Chip quirks (default = 0" ", nonatomic cycle timer = " __stringify(QUIRK_CYCLE_TIMER) ", reset packet generation = " __stringify(QUIRK_RESET_PACKET) @@ -364,7 +364,7 @@ MODULE_PARM_DESC(quirks, "Chip quirks (default = 0" #define OHCI_PARAM_DEBUG_BUSRESETS 8 /* only effective before chip init */ static int param_debug; -module_param_named(debug, param_debug, int, 0644); +module_param_named(debug, param_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(debug, "Verbose logging (default = 0" ", AT/AR events = " __stringify(OHCI_PARAM_DEBUG_AT_AR) ", self-IDs = " __stringify(OHCI_PARAM_DEBUG_SELFIDS) @@ -373,7 +373,7 @@ MODULE_PARM_DESC(debug, "Verbose logging (default = 0" ", or a combination, or all = -1)"); static bool param_remote_dma; -module_param_named(remote_dma, param_remote_dma, bool, 0444); +module_param_named(remote_dma, param_remote_dma, bool, S_IRUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(remote_dma, "Enable unfiltered remote DMA (default = N)"); static void log_irqs(struct fw_ohci *ohci, u32 evt) -- 2.9.2