lkml.org 
[lkml]   [2021]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 1/2] pinctrl: use to octal permissions for debugfs files
On Wed, Feb 10, 2021 at 10:30 AM Joe Perches <joe@perches.com> wrote:
> On Tue, 2021-02-09 at 23:49 -0800, Drew Fustini wrote:

> > - debugfs_create_file("pinctrl-devices", S_IFREG | S_IRUGO,
> > + debugfs_create_file("pinctrl-devices", 0400,
> > debugfs_root, NULL, &pinctrl_devices_fops);
>
> NAK. You've changed the permission levels.

NAK is usually given when the whole idea is broken. Here is not the
case and you may have helped to amend the patch.

...

> And you have to keep the S_IFREG or'd along with the octal.

Perhaps time to read the code?
https://elixir.bootlin.com/linux/latest/source/fs/debugfs/inode.c#L387

...

> checkpatch does this conversion using this command line:
>
> $ ./scripts/checkpatch.pl -f --show-types --terse drivers/pinctrl/*.[ch] --types=SYMBOLIC_PERMS --fix-inplace

NAK! See above.

> - debugfs_create_file("pins", S_IFREG | S_IRUGO,
> + debugfs_create_file("pins", S_IFREG | 0444,
> device_root, pctldev, &pinctrl_pins_fops);

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2021-02-10 11:31    [W:0.085 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site