From patchwork Tue Aug 2 10:46:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baole Ni X-Patchwork-Id: 655070 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3s3kY26XCQz9t39 for ; Wed, 3 Aug 2016 04:01:42 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755171AbcHBSBf (ORCPT ); Tue, 2 Aug 2016 14:01:35 -0400 Received: from mga09.intel.com ([134.134.136.24]:15779 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755893AbcHBLga (ORCPT ); Tue, 2 Aug 2016 07:36:30 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 02 Aug 2016 04:24:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,459,1464678000"; d="scan'208";a="1033567178" Received: from shsibuild003.sh.intel.com ([10.239.146.225]) by fmsmga002.fm.intel.com with ESMTP; 02 Aug 2016 04:24:28 -0700 From: Baole Ni To: m@bues.ch, linus.walleij@linaro.org, gnurou@gmail.com, tony.luck@intel.com, matt@codeblueprint.co.uk, m.chehab@samsung.com, lho@apm.com, dougthompson@xmission.com, bp@alien8.de Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, chuansheng.liu@intel.com, baolex.ni@intel.com, lee.jones@linaro.org Subject: [PATCH 0176/1285] Replace numeric parameter like 0444 with macro Date: Tue, 2 Aug 2016 18:46:50 +0800 Message-Id: <20160802104650.25471-1-baolex.ni@intel.com> X-Mailer: git-send-email 2.9.2 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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/gpio/gpio-bt8xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-bt8xx.c b/drivers/gpio/gpio-bt8xx.c index acefb25..606b3c7 100644 --- a/drivers/gpio/gpio-bt8xx.c +++ b/drivers/gpio/gpio-bt8xx.c @@ -74,7 +74,7 @@ struct bt8xxgpio { static int modparam_gpiobase = -1/* dynamic */; -module_param_named(gpiobase, modparam_gpiobase, int, 0444); +module_param_named(gpiobase, modparam_gpiobase, int, S_IRUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(gpiobase, "The GPIO number base. -1 means dynamic, which is the default.");