From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965035AbcHBMa6 (ORCPT ); Tue, 2 Aug 2016 08:30:58 -0400 Received: from mga02.intel.com ([134.134.136.20]:49009 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934822AbcHBM27 (ORCPT ); Tue, 2 Aug 2016 08:28:59 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,460,1464678000"; d="scan'208";a="858134103" From: Baole Ni To: konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, david.vrabel@citrix.com, jgross@suse.com, bhelgaas@google.com, m.chehab@samsung.com, pawel@osciak.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, k.kozlowski@samsung.com Cc: linux-pcmcia@lists.infradead.org, linux-kernel@vger.kernel.org, chuansheng.liu@intel.com, baolex.ni@intel.com Subject: [PATCH 0830/1285] Replace numeric parameter like 0444 with macro Date: Tue, 2 Aug 2016 19:50:33 +0800 Message-Id: <20160802115033.5315-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/pcmcia/i82365.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c index eb0d80a..249f29e 100644 --- a/drivers/pcmcia/i82365.c +++ b/drivers/pcmcia/i82365.c @@ -108,27 +108,27 @@ static int async_clock = -1; static int cable_mode = -1; static int wakeup = 0; -module_param(i365_base, ulong, 0444); -module_param(ignore, int, 0444); -module_param(extra_sockets, int, 0444); -module_param(irq_mask, int, 0444); -module_param_array(irq_list, int, &irq_list_count, 0444); -module_param(cs_irq, int, 0444); -module_param(async_clock, int, 0444); -module_param(cable_mode, int, 0444); -module_param(wakeup, int, 0444); - -module_param(do_scan, int, 0444); -module_param(poll_interval, int, 0444); -module_param(cycle_time, int, 0444); -module_param(has_dma, int, 0444); -module_param(has_led, int, 0444); -module_param(has_ring, int, 0444); -module_param(dynamic_mode, int, 0444); -module_param(freq_bypass, int, 0444); -module_param(setup_time, int, 0444); -module_param(cmd_time, int, 0444); -module_param(recov_time, int, 0444); +module_param(i365_base, ulong, S_IRUSR | S_IRGRP | S_IROTH); +module_param(ignore, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(extra_sockets, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(irq_mask, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param_array(irq_list, int, &irq_list_count, S_IRUSR | S_IRGRP | S_IROTH); +module_param(cs_irq, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(async_clock, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(cable_mode, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(wakeup, int, S_IRUSR | S_IRGRP | S_IROTH); + +module_param(do_scan, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(poll_interval, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(cycle_time, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(has_dma, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(has_led, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(has_ring, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(dynamic_mode, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(freq_bypass, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(setup_time, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(cmd_time, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(recov_time, int, S_IRUSR | S_IRGRP | S_IROTH); /*====================================================================*/ -- 2.9.2