X86 platform drivers
 help / color / mirror / Atom feed
From: "Peter Feuerer" <peter@piie.net>
To: Baole Ni <baolex.ni@intel.com>,
	dvhart@infradead.org, 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: platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, chuansheng.liu@intel.com
Subject: Re: [PATCH 0841/1285] Replace numeric parameter like 0444 with macro
Date: Thu, 11 Aug 2016 21:21:48 +0000	[thread overview]
Message-ID: <95991cb563633df910245c1fa8d83169@mail.piie.net> (raw)
In-Reply-To: <20160802115136.6059-1-baolex.ni@intel.com>

2. August 2016 14:29 Uhr, "Baole Ni" <baolex.ni@intel.com> schrieb:
> 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 <chuansheng.liu@intel.com>
> Signed-off-by: Baole Ni <baolex.ni@intel.com>

Acked-by: Peter Feuerer <peter@piie.net>

> ---
> drivers/platform/x86/acerhdf.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
> index 460fa67..a4706dd 100644
> --- a/drivers/platform/x86/acerhdf.c
> +++ b/drivers/platform/x86/acerhdf.c
> @@ -96,13 +96,13 @@ static struct platform_device *acerhdf_dev;
> 
> module_param(kernelmode, uint, 0);
> MODULE_PARM_DESC(kernelmode, "Kernel mode fan control on / off");
> -module_param(interval, uint, 0600);
> +module_param(interval, uint, S_IRUSR | S_IWUSR);
> MODULE_PARM_DESC(interval, "Polling interval of temperature check");
> -module_param(fanon, uint, 0600);
> +module_param(fanon, uint, S_IRUSR | S_IWUSR);
> MODULE_PARM_DESC(fanon, "Turn the fan on above this temperature");
> -module_param(fanoff, uint, 0600);
> +module_param(fanoff, uint, S_IRUSR | S_IWUSR);
> MODULE_PARM_DESC(fanoff, "Turn the fan off below this temperature");
> -module_param(verbose, uint, 0600);
> +module_param(verbose, uint, S_IRUSR | S_IWUSR);
> MODULE_PARM_DESC(verbose, "Enable verbose dmesg output");
> module_param_string(force_bios, force_bios, 16, 0);
> MODULE_PARM_DESC(force_bios, "Force BIOS version and omit BIOS check");
> -- 
> 2.9.2

-- 
thanks,
--peter;

  reply	other threads:[~2016-08-11 21:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 11:51 [PATCH 0841/1285] Replace numeric parameter like 0444 with macro Baole Ni
2016-08-11 21:21 ` Peter Feuerer [this message]
2016-08-19 20:02   ` Darren Hart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95991cb563633df910245c1fa8d83169@mail.piie.net \
    --to=peter@piie.net \
    --cc=baolex.ni@intel.com \
    --cc=bhelgaas@google.com \
    --cc=chuansheng.liu@intel.com \
    --cc=david.vrabel@citrix.com \
    --cc=dvhart@infradead.org \
    --cc=jgross@suse.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=m.szyprowski@samsung.com \
    --cc=pawel@osciak.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox