Re: [PATCH v2 1/2] pinctrl: use to octal permissions for debugfs files

From: Geert Uytterhoeven
Date: Wed Feb 10 2021 - 03:39:09 EST


Hi Drew,

On Wed, Feb 10, 2021 at 8:50 AM Drew Fustini <drew@xxxxxxxxxxxxxxx> wrote:
> Switch over pinctrl debugfs files to use octal permissions as they are
> preferred over symbolic permissions. Refer to commit f90774e1fd27
> ("checkpatch: look for symbolic permissions and suggest octal instead").
>
> Signed-off-by: Drew Fustini <drew@xxxxxxxxxxxxxxx>

Thanks for your patch!

> --- a/drivers/pinctrl/core.c
> +++ b/drivers/pinctrl/core.c
> @@ -1914,11 +1914,11 @@ static void pinctrl_init_debugfs(void)
> return;
> }
>
> - debugfs_create_file("pinctrl-devices", S_IFREG | S_IRUGO,
> + debugfs_create_file("pinctrl-devices", 0400,

What about the loss of S_IFREG?
S_IRUGO = 0444, not 0400.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds