pinctrl: use to octal permissions for debugfs files
Subsystems (2)
PATCH 1/1 pinctrl: use to octal permissions for debugfs files
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").
---
Patch note:
- I learned about this preference of octal over symbolic when I created an RFC to add a new debugfs file ("pinmux-select"). I am submitting this patch to switch existing entries in pinctrl over to octal before I submit a proper PATCH for the "pinmux-select" functionality in which I will use octal permissions for the new file.
drivers/pinctrl/core.c | 6 +++--- drivers/pinctrl/pinconf.c | 4 ++-- drivers/pinctrl/pinmux.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/pinctrl/core.c +3 -3
@@ -1916,11 +1916,11 @@ static void pinctrl_init_debugfs(void)return ; } -debugfs_create_file ("pinctrl-devices" ,S_IFREG |S_IRUGO , +debugfs_create_file ("pinctrl-devices" ,0400 , debugfs_root,NULL , &pinctrl_devices_fops); -debugfs_create_file ("pinctrl-maps" ,S_IFREG |S_IRUGO , +debugfs_create_file ("pinctrl-maps" ,0400 , debugfs_root,NULL , &pinctrl_maps_fops); -debugfs_create_file ("pinctrl-handles" ,S_IFREG |S_IRUGO , +debugfs_create_file ("pinctrl-handles" ,0400 , debugfs_root,NULL , &pinctrl_fops); }
drivers/pinctrl/pinconf.c +2 -2
@@ -370,9 +370,9 @@ DEFINE_SHOW_ATTRIBUTE(pinconf_groups);void pinconf_init_device_debugfs (struct dentry *devroot,struct pinctrl_dev *pctldev) { -debugfs_create_file ("pinconf-pins" ,S_IFREG |S_IRUGO , +debugfs_create_file ("pinconf-pins" ,0400 , devroot, pctldev, &pinconf_pins_fops); -debugfs_create_file ("pinconf-groups" ,S_IFREG |S_IRUGO , +debugfs_create_file ("pinconf-groups" ,0400 , devroot, pctldev, &pinconf_groups_fops); }
drivers/pinctrl/pinmux.c +2 -2
@@ -676,9 +676,9 @@ DEFINE_SHOW_ATTRIBUTE(pinmux_pins);void pinmux_init_device_debugfs (struct dentry *devroot,struct pinctrl_dev *pctldev) { -debugfs_create_file ("pinmux-functions" ,S_IFREG |S_IRUGO , +debugfs_create_file ("pinmux-functions" ,0400 , devroot, pctldev, &pinmux_functions_fops); -debugfs_create_file ("pinmux-pins" ,S_IFREG |S_IRUGO , +debugfs_create_file ("pinmux-pins" ,0400 , devroot, pctldev, &pinmux_pins_fops); }
Signature · 1 line
2.25.1
Quoted 5 lines · Drew Fustini
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 <[email protected]>
That's right. Patch applied!
Yours,
Linus Walleij
Quoted 6 lines · Linus Walleij
Quoted 4 lines · Drew Fustini
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").
Quoted 6 lines
Quoted 1 line
Signed-off-by Drew Fustini <[email protected]>That's right. Patch applied!
Yours,
Linus Walleij
Thanks, Linus. However, Andy suggested I make this a series as it was prep for my patch to add 'pinmux-select' to debugfs. I posted it as part of a 2 patch series [1]. In addition, Joe Perches noticed I forgot 3 instances of debugfs_create_file() in core.c so I was about to fix that in v5 of the patch series. v5 is mostly addressing comments on the pinmux-select feature.
Thank you,
Drew
Quoted 14 lines · Drew Fustini
Quoted 6 lines · Linus Walleij
Quoted 4 lines · Drew Fustini
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").Quoted 6 lines
Quoted 1 line
Signed-off-by Drew Fustini <[email protected]>That's right. Patch applied!
Yours,
Linus Walleij
Quoted 6 lines
Thanks, Linus. However, Andy suggested I make this a series as it was prep for my patch to add 'pinmux-select' to debugfs. I posted it as part of a 2 patch series [1]. In addition, Joe Perches noticed I forgot 3 instances of
debugfs_create_file()incore.cso I was about to fix that in v5 of the patch series. v5 is mostly addressing comments on the pinmux-select feature.
Oh I saw that and pulled it out again, no big deal.
Yours,
Linus Walleij