Message ID | 20201118145112.21250-1-sohambiswas41@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [v3] pwm: core: Use octal permission | expand |
On Wed, 18 Nov 2020 at 20:21, Soham Biswas <sohambiswas41@gmail.com> wrote: > > Permission bits are easier readable in octal than with using the > symbolic names. > > Fixes the following warning generated by checkpatch: > > drivers/pwm/core.c:1341: WARNING: Symbolic permissions 'S_IRUGO' are > not preferred. Consider using octal permissions '0444'. > > +debugfs_create_file("pwm", S_IFREG | S_IRUGO, NULL, NULL, > &pwm_debugfs_fops); > > Signed-off-by: Soham Biswas <sohambiswas41@gmail.com> > --- > drivers/pwm/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c > index 1f16f5365d3c..a8eff4b3ee36 100644 > --- a/drivers/pwm/core.c > +++ b/drivers/pwm/core.c > @@ -1338,7 +1338,7 @@ DEFINE_SEQ_ATTRIBUTE(pwm_debugfs); > > static int __init pwm_debugfs_init(void) > { > - debugfs_create_file("pwm", S_IFREG | S_IRUGO, NULL, NULL, > + debugfs_create_file("pwm", S_IFREG | 0444, NULL, NULL, > &pwm_debugfs_fops); > > return 0; > -- > 2.29.2 > I passed the `-v3` flag this time to the git format patch and fixed the long lines error. It changed the name of the patch file though xD
On Wed, Nov 18, 2020 at 08:21:12PM +0530, Soham Biswas wrote: > Permission bits are easier readable in octal than with using the > symbolic names. > > Fixes the following warning generated by checkpatch: > > drivers/pwm/core.c:1341: WARNING: Symbolic permissions 'S_IRUGO' are > not preferred. Consider using octal permissions '0444'. > > +debugfs_create_file("pwm", S_IFREG | S_IRUGO, NULL, NULL, > &pwm_debugfs_fops); > > Signed-off-by: Soham Biswas <sohambiswas41@gmail.com> > --- > drivers/pwm/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. Though I did unwrap the checkpatch warning message as Uwe suggested. Thierry
On Wed, 18 Nov 2020 at 23:29, Thierry Reding <thierry.reding@gmail.com> wrote: > > On Wed, Nov 18, 2020 at 08:21:12PM +0530, Soham Biswas wrote: > > Permission bits are easier readable in octal than with using the > > symbolic names. > > > > Fixes the following warning generated by checkpatch: > > > > drivers/pwm/core.c:1341: WARNING: Symbolic permissions 'S_IRUGO' are > > not preferred. Consider using octal permissions '0444'. > > > > +debugfs_create_file("pwm", S_IFREG | S_IRUGO, NULL, NULL, > > &pwm_debugfs_fops); > > > > Signed-off-by: Soham Biswas <sohambiswas41@gmail.com> > > --- > > drivers/pwm/core.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Applied, thanks. Though I did unwrap the checkpatch warning message as > Uwe suggested. > > Thierry Thank You!
On Wed, Nov 18, 2020 at 06:59:36PM +0100, Thierry Reding wrote: > On Wed, Nov 18, 2020 at 08:21:12PM +0530, Soham Biswas wrote: > > Permission bits are easier readable in octal than with using the > > symbolic names. > > > > Fixes the following warning generated by checkpatch: > > > > drivers/pwm/core.c:1341: WARNING: Symbolic permissions 'S_IRUGO' are > > not preferred. Consider using octal permissions '0444'. > > > > +debugfs_create_file("pwm", S_IFREG | S_IRUGO, NULL, NULL, > > &pwm_debugfs_fops); > > > > Signed-off-by: Soham Biswas <sohambiswas41@gmail.com> > > --- > > drivers/pwm/core.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Applied, thanks. Though I did unwrap the checkpatch warning message as > Uwe suggested. Then feel free to add my Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Thanks Uwe
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 1f16f5365d3c..a8eff4b3ee36 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -1338,7 +1338,7 @@ DEFINE_SEQ_ATTRIBUTE(pwm_debugfs); static int __init pwm_debugfs_init(void) { - debugfs_create_file("pwm", S_IFREG | S_IRUGO, NULL, NULL, + debugfs_create_file("pwm", S_IFREG | 0444, NULL, NULL, &pwm_debugfs_fops); return 0;
Permission bits are easier readable in octal than with using the symbolic names. Fixes the following warning generated by checkpatch: drivers/pwm/core.c:1341: WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +debugfs_create_file("pwm", S_IFREG | S_IRUGO, NULL, NULL, &pwm_debugfs_fops); Signed-off-by: Soham Biswas <sohambiswas41@gmail.com> --- drivers/pwm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)