linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Hennerich <michael.hennerich@analog.com>
To: Baole Ni <baolex.ni@intel.com>,
	dmitry.torokhov@gmail.com, hal.rosenstock@gmail.com,
	dledford@redhat.com, sean.hefty@intel.com, bp@alien8.de
Cc: linux-input@vger.kernel.org, chuansheng.liu@intel.com
Subject: Re: [PATCH 0289/1285] Replace numeric parameter like 0444 with macro
Date: Tue, 2 Aug 2016 14:13:35 +0200	[thread overview]
Message-ID: <aca45400-b476-a48c-913c-09c4360a577a@analog.com> (raw)
In-Reply-To: <20160802105705.635-1-baolex.ni@intel.com>

On 02.08.2016 12:57, 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>

Acked-by: Michael Hennerich <michael.hennerich@analog.com>

> ---
>  drivers/input/touchscreen/ad7879.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c
> index e4bf110..83be4c5 100644
> --- a/drivers/input/touchscreen/ad7879.c
> +++ b/drivers/input/touchscreen/ad7879.c
> @@ -364,7 +364,7 @@ static ssize_t ad7879_disable_store(struct device *dev,
>  	return count;
>  }
>
> -static DEVICE_ATTR(disable, 0664, ad7879_disable_show, ad7879_disable_store);
> +static DEVICE_ATTR(disable, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, ad7879_disable_show, ad7879_disable_store);
>
>  static struct attribute *ad7879_attributes[] = {
>  	&dev_attr_disable.attr,
>


-- 
Greetings,
Michael

--
Analog Devices GmbH      Otl-Aicher Strasse 60-64      80807 München
Sitz der Gesellschaft München, Registergericht München HRB 40368,
Geschäftsführer: Peter Kolberg, Ali Raza Husain, Eileen Wynne

      reply	other threads:[~2016-08-02 14:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 10:57 [PATCH 0289/1285] Replace numeric parameter like 0444 with macro Baole Ni
2016-08-02 12:13 ` Michael Hennerich [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=aca45400-b476-a48c-913c-09c4360a577a@analog.com \
    --to=michael.hennerich@analog.com \
    --cc=baolex.ni@intel.com \
    --cc=bp@alien8.de \
    --cc=chuansheng.liu@intel.com \
    --cc=dledford@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=sean.hefty@intel.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).