All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Fabian Frederick <fabf@skynet.be>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH 6/8 linux-next] libnvdimm, namespace: use octal for permissions
Date: Fri, 2 Dec 2016 11:55:40 -0800	[thread overview]
Message-ID: <CAPcyv4gFswm=C-vXZ4fK3cndzpXN7nDz5VzpKESjtd01Fp2PRg@mail.gmail.com> (raw)
In-Reply-To: <1480706506-21222-1-git-send-email-fabf@skynet.be>

On Fri, Dec 2, 2016 at 11:21 AM, Fabian Frederick <fabf@skynet.be> wrote:
> According to commit f90774e1fd27
> ("checkpatch: look for symbolic permissions and suggest octal instead")
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  drivers/nvdimm/namespace_devs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
> index b00045b..0d2da9a 100644
> --- a/drivers/nvdimm/namespace_devs.c
> +++ b/drivers/nvdimm/namespace_devs.c
> @@ -1132,7 +1132,7 @@ static ssize_t size_show(struct device *dev,
>         return sprintf(buf, "%llu\n", (unsigned long long)
>                         nvdimm_namespace_capacity(to_ndns(dev)));
>  }
> -static DEVICE_ATTR(size, S_IRUGO, size_show, size_store);
> +static DEVICE_ATTR(size, 0444, size_show, size_store);
>
>  static u8 *namespace_to_uuid(struct device *dev)
>  {
> @@ -1456,7 +1456,7 @@ static umode_t namespace_visible(struct kobject *kobj,
>
>         if (is_namespace_pmem(dev) || is_namespace_blk(dev)) {
>                 if (a == &dev_attr_size.attr)
> -                       return S_IWUSR | S_IRUGO;
> +                       return 0200 | 0444;

If we're going to use octal just go to "0644" directly.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com>
To: Fabian Frederick <fabf@skynet.be>
Cc: "linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 6/8 linux-next] libnvdimm, namespace: use octal for permissions
Date: Fri, 2 Dec 2016 11:55:40 -0800	[thread overview]
Message-ID: <CAPcyv4gFswm=C-vXZ4fK3cndzpXN7nDz5VzpKESjtd01Fp2PRg@mail.gmail.com> (raw)
In-Reply-To: <1480706506-21222-1-git-send-email-fabf@skynet.be>

On Fri, Dec 2, 2016 at 11:21 AM, Fabian Frederick <fabf@skynet.be> wrote:
> According to commit f90774e1fd27
> ("checkpatch: look for symbolic permissions and suggest octal instead")
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  drivers/nvdimm/namespace_devs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
> index b00045b..0d2da9a 100644
> --- a/drivers/nvdimm/namespace_devs.c
> +++ b/drivers/nvdimm/namespace_devs.c
> @@ -1132,7 +1132,7 @@ static ssize_t size_show(struct device *dev,
>         return sprintf(buf, "%llu\n", (unsigned long long)
>                         nvdimm_namespace_capacity(to_ndns(dev)));
>  }
> -static DEVICE_ATTR(size, S_IRUGO, size_show, size_store);
> +static DEVICE_ATTR(size, 0444, size_show, size_store);
>
>  static u8 *namespace_to_uuid(struct device *dev)
>  {
> @@ -1456,7 +1456,7 @@ static umode_t namespace_visible(struct kobject *kobj,
>
>         if (is_namespace_pmem(dev) || is_namespace_blk(dev)) {
>                 if (a == &dev_attr_size.attr)
> -                       return S_IWUSR | S_IRUGO;
> +                       return 0200 | 0444;

If we're going to use octal just go to "0644" directly.

  reply	other threads:[~2016-12-02 19:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02 19:21 [PATCH 6/8 linux-next] libnvdimm, namespace: use octal for permissions Fabian Frederick
2016-12-02 19:21 ` Fabian Frederick
2016-12-02 19:55 ` Dan Williams [this message]
2016-12-02 19:55   ` Dan Williams

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='CAPcyv4gFswm=C-vXZ4fK3cndzpXN7nDz5VzpKESjtd01Fp2PRg@mail.gmail.com' \
    --to=dan.j.williams@intel.com \
    --cc=fabf@skynet.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.