linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Geoff Levand <geoff@infradead.org>
To: Baole Ni <baolex.ni@intel.com>,
	benh@kernel.crashing.org, paulus@samba.org,  mpe@ellerman.id.au,
	dwmw2@infradead.org, m.chehab@samsung.com, pawel@osciak.com,
	 m.szyprowski@samsung.com, kyungmin.park@samsung.com,
	k.kozlowski@samsung.com
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	chuansheng.liu@intel.com
Subject: Re: [PATCH 0867/1285] Replace numeric parameter like 0444 with macro
Date: Tue, 02 Aug 2016 09:45:29 -0700	[thread overview]
Message-ID: <1470156329.16559.57.camel@infradead.org> (raw)
In-Reply-To: <20160802115333.7780-1-baolex.ni@intel.com>

On Tue, 2016-08-02 at 19:53 +0800, Baole Ni wrote:
> 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>
> ---
>  
>  static int timeout = 5000;	/* in msec ( 5 sec ) */
> -module_param(timeout, int, 0644);
> +module_param(timeout, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);

To me, 644 is more 'readable', and as for robustness, the meaning of
644 will never change.

-Geoff

      reply	other threads:[~2016-08-02 16:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 11:53 [PATCH 0867/1285] Replace numeric parameter like 0444 with macro Baole Ni
2016-08-02 16:45 ` Geoff Levand [this message]

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=1470156329.16559.57.camel@infradead.org \
    --to=geoff@infradead.org \
    --cc=baolex.ni@intel.com \
    --cc=benh@kernel.crashing.org \
    --cc=chuansheng.liu@intel.com \
    --cc=dwmw2@infradead.org \
    --cc=k.kozlowski@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=m.chehab@samsung.com \
    --cc=m.szyprowski@samsung.com \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=pawel@osciak.com \
    /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;
as well as URLs for NNTP newsgroup(s).