All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pwm: core: Use octal permission
@ 2020-11-17 17:54 Soham Biswas
  2020-11-17 18:12 ` Lee Jones
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Soham Biswas @ 2020-11-17 17:54 UTC (permalink / raw)
  To: thierry.reding
  Cc: lee.jones, u.kleine-koenig, linux-pwm, linux-kernel, Soham Biswas

Fixed Warning.
Replaced symbolic permission 'S_IRUGO' with octal permission '0444'.

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


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-17 17:54 [PATCH] pwm: core: Use octal permission Soham Biswas
@ 2020-11-17 18:12 ` Lee Jones
  2020-11-17 18:17   ` Soham Biswas
  2020-11-17 18:21   ` Soham Biswas
  2020-11-18 10:47 ` Soham Biswas
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 25+ messages in thread
From: Lee Jones @ 2020-11-17 18:12 UTC (permalink / raw)
  To: Soham Biswas; +Cc: thierry.reding, u.kleine-koenig, linux-pwm, linux-kernel

On Tue, 17 Nov 2020, Soham Biswas wrote:

> Fixed Warning.

Which warning does this fix?

> Replaced symbolic permission 'S_IRUGO' with octal permission '0444'.

This is semantically equivalent.

Not sure what and/or how this fixes anything.

> 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;

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-17 18:12 ` Lee Jones
@ 2020-11-17 18:17   ` Soham Biswas
  2020-11-17 18:21   ` Soham Biswas
  1 sibling, 0 replies; 25+ messages in thread
From: Soham Biswas @ 2020-11-17 18:17 UTC (permalink / raw)
  To: Lee Jones; +Cc: thierry.reding, u.kleine-koenig, linux-pwm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]

This fixes the following warning:

`drivers/pwm/core.c:1341: WARNING: Symbolic permissions 'S_IRUGO' are not
preferred. Consider using octal permissions '0444'.`

generated by the following script:

`./scripts/checkpatch.pl --file --terse drivers/pwm/core.c`

On Tue, 17 Nov 2020 at 23:42, Lee Jones <lee.jones@linaro.org> wrote:

> On Tue, 17 Nov 2020, Soham Biswas wrote:
>
> > Fixed Warning.
>
> Which warning does this fix?
>
> > Replaced symbolic permission 'S_IRUGO' with octal permission '0444'.
>
> This is semantically equivalent.
>
> Not sure what and/or how this fixes anything.
>
> > 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;
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog
>

[-- Attachment #2: Type: text/html, Size: 2094 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-17 18:12 ` Lee Jones
  2020-11-17 18:17   ` Soham Biswas
@ 2020-11-17 18:21   ` Soham Biswas
  2020-11-18  8:51     ` Lee Jones
  1 sibling, 1 reply; 25+ messages in thread
From: Soham Biswas @ 2020-11-17 18:21 UTC (permalink / raw)
  To: Lee Jones; +Cc: thierry.reding, u.kleine-koenig, linux-pwm, linux-kernel

This fixes the following warning:

`drivers/pwm/core.c:1341: WARNING: Symbolic permissions 'S_IRUGO' are
not preferred. Consider using octal permissions '0444'.`

generated by the following script:

`./scripts/checkpatch.pl --file --terse drivers/pwm/core.c`


On Tue, 17 Nov 2020 at 23:42, Lee Jones <lee.jones@linaro.org> wrote:
>
> On Tue, 17 Nov 2020, Soham Biswas wrote:
>
> > Fixed Warning.
>
> Which warning does this fix?
>
> > Replaced symbolic permission 'S_IRUGO' with octal permission '0444'.
>
> This is semantically equivalent.
>
> Not sure what and/or how this fixes anything.
>
> > 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;
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-17 18:21   ` Soham Biswas
@ 2020-11-18  8:51     ` Lee Jones
  2020-11-18  9:35       ` Uwe Kleine-König
  0 siblings, 1 reply; 25+ messages in thread
From: Lee Jones @ 2020-11-18  8:51 UTC (permalink / raw)
  To: Soham Biswas; +Cc: thierry.reding, u.kleine-koenig, linux-pwm, linux-kernel

On Tue, 17 Nov 2020, Soham Biswas wrote:

> This fixes the following warning:
> 
> `drivers/pwm/core.c:1341: WARNING: Symbolic permissions 'S_IRUGO' are
> not preferred. Consider using octal permissions '0444'.`
> 
> generated by the following script:
> 
> `./scripts/checkpatch.pl --file --terse drivers/pwm/core.c`

Oh, it's a checkpatch.pl thing.

You should definitely quote the warning and describe where it came
from in the commit log.

Not entirely sure what that warning is the result of.  Probably as
they're sightly harder to read and easier to get wrong.  Still, I'll
let Thierry decide whether the patch itself is suitable for inclusion
into the PWM core.

> On Tue, 17 Nov 2020 at 23:42, Lee Jones <lee.jones@linaro.org> wrote:
> >
> > On Tue, 17 Nov 2020, Soham Biswas wrote:
> >
> > > Fixed Warning.
> >
> > Which warning does this fix?
> >
> > > Replaced symbolic permission 'S_IRUGO' with octal permission '0444'.
> >
> > This is semantically equivalent.
> >
> > Not sure what and/or how this fixes anything.
> >
> > > 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;
> >

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-18  8:51     ` Lee Jones
@ 2020-11-18  9:35       ` Uwe Kleine-König
  2020-11-18  9:41         ` Joe Perches
  0 siblings, 1 reply; 25+ messages in thread
From: Uwe Kleine-König @ 2020-11-18  9:35 UTC (permalink / raw)
  To: Lee Jones; +Cc: Soham Biswas, thierry.reding, linux-pwm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2170 bytes --]

On Wed, Nov 18, 2020 at 08:51:13AM +0000, Lee Jones wrote:
> On Tue, 17 Nov 2020, Soham Biswas wrote:
> 
> > This fixes the following warning:
> > 
> > `drivers/pwm/core.c:1341: WARNING: Symbolic permissions 'S_IRUGO' are
> > not preferred. Consider using octal permissions '0444'.`
> > 
> > generated by the following script:
> > 
> > `./scripts/checkpatch.pl --file --terse drivers/pwm/core.c`
> 
> Oh, it's a checkpatch.pl thing.
> 
> You should definitely quote the warning and describe where it came
> from in the commit log.
> 
> Not entirely sure what that warning is the result of.  Probably as
> they're sightly harder to read and easier to get wrong.  Still, I'll
> let Thierry decide whether the patch itself is suitable for inclusion
> into the PWM core.
> 
> > On Tue, 17 Nov 2020 at 23:42, Lee Jones <lee.jones@linaro.org> wrote:
> > >
> > > On Tue, 17 Nov 2020, Soham Biswas wrote:
> > >
> > > > Fixed Warning.
> > >
> > > Which warning does this fix?
> > >
> > > > Replaced symbolic permission 'S_IRUGO' with octal permission '0444'.
> > >
> > > This is semantically equivalent.
> > >
> > > Not sure what and/or how this fixes anything.
> > >
> > > > 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,

Actually I'd prefer keeping the symbolic name because this is easier to
grep for. So to convince me a better reason than "checkpatch says so" is
needed.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-18  9:35       ` Uwe Kleine-König
@ 2020-11-18  9:41         ` Joe Perches
  2020-11-18  9:49           ` Lee Jones
  2020-11-18  9:50           ` Uwe Kleine-König
  0 siblings, 2 replies; 25+ messages in thread
From: Joe Perches @ 2020-11-18  9:41 UTC (permalink / raw)
  To: Uwe Kleine-König, Lee Jones
  Cc: Soham Biswas, thierry.reding, linux-pwm, linux-kernel

On Wed, 2020-11-18 at 10:35 +0100, Uwe Kleine-König wrote:

> Actually I'd prefer keeping the symbolic name because this is easier to
> grep for. So to convince me a better reason than "checkpatch says so" is
> needed.

https://lore.kernel.org/lkml/CA+55aFw5v23T-zvDZp-MmD_EYxF8WbafwwB59934FV7g21uMGQ@mail.gmail.com/
-------------------------------------------------------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Tue, 2 Aug 2016 16:58:29 -0400

The symbolic names are good for the *other* bits (ie sticky bit, and
the inode mode _type_ numbers etc), but for the permission bits, the
symbolic names are just insane crap. Nobody sane should ever use them.
Not in the kernel, not in user space.

           Linus



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-18  9:41         ` Joe Perches
@ 2020-11-18  9:49           ` Lee Jones
  2020-11-18  9:50           ` Uwe Kleine-König
  1 sibling, 0 replies; 25+ messages in thread
From: Lee Jones @ 2020-11-18  9:49 UTC (permalink / raw)
  To: Joe Perches
  Cc: Uwe Kleine-König, Soham Biswas, thierry.reding, linux-pwm,
	linux-kernel

On Wed, 18 Nov 2020, Joe Perches wrote:

> On Wed, 2020-11-18 at 10:35 +0100, Uwe Kleine-König wrote:
> 
> > Actually I'd prefer keeping the symbolic name because this is easier to
> > grep for. So to convince me a better reason than "checkpatch says so" is
> > needed.
> 
> https://lore.kernel.org/lkml/CA+55aFw5v23T-zvDZp-MmD_EYxF8WbafwwB59934FV7g21uMGQ@mail.gmail.com/
> -------------------------------------------------------------------
> From: Linus Torvalds <torvalds@linux-foundation.org>
> Date: Tue, 2 Aug 2016 16:58:29 -0400
> 
> The symbolic names are good for the *other* bits (ie sticky bit, and
> the inode mode _type_ numbers etc), but for the permission bits, the
> symbolic names are just insane crap. Nobody sane should ever use them.
> Not in the kernel, not in user space.
> 
>            Linus

I was waiting for this!

I see your "checkpatch" filter is working well Joe. :)

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-18  9:41         ` Joe Perches
  2020-11-18  9:49           ` Lee Jones
@ 2020-11-18  9:50           ` Uwe Kleine-König
  1 sibling, 0 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2020-11-18  9:50 UTC (permalink / raw)
  To: Soham Biswas
  Cc: Lee Jones, thierry.reding, Joe Perches, linux-pwm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]

On Wed, Nov 18, 2020 at 01:41:31AM -0800, Joe Perches wrote:
> On Wed, 2020-11-18 at 10:35 +0100, Uwe Kleine-König wrote:
> 
> > Actually I'd prefer keeping the symbolic name because this is easier to
> > grep for. So to convince me a better reason than "checkpatch says so" is
> > needed.
> 
> https://lore.kernel.org/lkml/CA+55aFw5v23T-zvDZp-MmD_EYxF8WbafwwB59934FV7g21uMGQ@mail.gmail.com/
> -------------------------------------------------------------------
> From: Linus Torvalds <torvalds@linux-foundation.org>
> Date: Tue, 2 Aug 2016 16:58:29 -0400
> 
> The symbolic names are good for the *other* bits (ie sticky bit, and
> the inode mode _type_ numbers etc), but for the permission bits, the
> symbolic names are just insane crap. Nobody sane should ever use them.
> Not in the kernel, not in user space.
> 
>            Linus

OK, "Linus says so" is considerably stronger than "checkpatch says so".
So if you respin the patch with a better commit log, that's fine for me.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH] pwm: core: Use octal permission
  2020-11-17 17:54 [PATCH] pwm: core: Use octal permission Soham Biswas
  2020-11-17 18:12 ` Lee Jones
@ 2020-11-18 10:47 ` Soham Biswas
  2020-11-18 12:43   ` [PATCH v2] " Uwe Kleine-König
  2020-11-18 13:58 ` [PATCH] " Soham Biswas
  2020-11-18 14:51 ` [PATCH v3] " Soham Biswas
  3 siblings, 1 reply; 25+ messages in thread
From: Soham Biswas @ 2020-11-18 10:47 UTC (permalink / raw)
  To: thierry.reding
  Cc: lee.jones, u.kleine-koenig, linux-pwm, linux-kernel, Soham Biswas

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


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH v2] pwm: core: Use octal permission
  2020-11-18 10:47 ` Soham Biswas
@ 2020-11-18 12:43   ` Uwe Kleine-König
  2020-11-18 13:41     ` Soham Biswas
  0 siblings, 1 reply; 25+ messages in thread
From: Uwe Kleine-König @ 2020-11-18 12:43 UTC (permalink / raw)
  To: Soham Biswas; +Cc: thierry.reding, lee.jones, linux-pwm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

[added "v2" to the subject, would have been better if you had already
done that. I don't know if/how this confuses tools like b4 and patchwork]

Hello,

On Wed, Nov 18, 2020 at 04:17:30PM +0530, Soham Biswas wrote:
> 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);

something like: "Permission bits are easier readable in octal than with
using the symbolic names." in the commit log would be good for those of
us who missed why this was added to checkpatch.

Best regards
Uwe
 

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2] pwm: core: Use octal permission
  2020-11-18 12:43   ` [PATCH v2] " Uwe Kleine-König
@ 2020-11-18 13:41     ` Soham Biswas
  2020-11-18 13:48       ` Uwe Kleine-König
  2020-11-18 13:49       ` Lee Jones
  0 siblings, 2 replies; 25+ messages in thread
From: Soham Biswas @ 2020-11-18 13:41 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: thierry.reding, Lee Jones, linux-pwm, linux-kernel

Sure will do that. Sorry for the inconvenience, I am a bit new to the
process of emailing patches. Should I mark the next patch as v3?

On Wed, 18 Nov 2020 at 18:13, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> [added "v2" to the subject, would have been better if you had already
> done that. I don't know if/how this confuses tools like b4 and patchwork]
>
> Hello,
>
> On Wed, Nov 18, 2020 at 04:17:30PM +0530, Soham Biswas wrote:
> > 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);
>
> something like: "Permission bits are easier readable in octal than with
> using the symbolic names." in the commit log would be good for those of
> us who missed why this was added to checkpatch.
>
> Best regards
> Uwe
>
>
> --
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | https://www.pengutronix.de/ |

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2] pwm: core: Use octal permission
  2020-11-18 13:41     ` Soham Biswas
@ 2020-11-18 13:48       ` Uwe Kleine-König
  2020-11-18 13:49       ` Lee Jones
  1 sibling, 0 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2020-11-18 13:48 UTC (permalink / raw)
  To: Soham Biswas; +Cc: thierry.reding, Lee Jones, linux-pwm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 445 bytes --]

On Wed, Nov 18, 2020 at 07:11:35PM +0530, Soham Biswas wrote:
> Sure will do that. Sorry for the inconvenience, I am a bit new to the
> process of emailing patches. Should I mark the next patch as v3?

Yes, just pass -v3 to git-format-patch or git-send-email.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2] pwm: core: Use octal permission
  2020-11-18 13:41     ` Soham Biswas
  2020-11-18 13:48       ` Uwe Kleine-König
@ 2020-11-18 13:49       ` Lee Jones
  1 sibling, 0 replies; 25+ messages in thread
From: Lee Jones @ 2020-11-18 13:49 UTC (permalink / raw)
  To: Soham Biswas
  Cc: Uwe Kleine-König, thierry.reding, linux-pwm, linux-kernel

On Wed, 18 Nov 2020, Soham Biswas wrote:

> Sure will do that. Sorry for the inconvenience, I am a bit new to the
> process of emailing patches. Should I mark the next patch as v3?

Make sure the text you are quoting does above your reply.

This is called top-posting and is frowned upon.

Yes, please bump the version number - it will make the tooling happy.

> On Wed, 18 Nov 2020 at 18:13, Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
> >
> > [added "v2" to the subject, would have been better if you had already
> > done that. I don't know if/how this confuses tools like b4 and patchwork]
> >
> > Hello,
> >
> > On Wed, Nov 18, 2020 at 04:17:30PM +0530, Soham Biswas wrote:
> > > 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);
> >
> > something like: "Permission bits are easier readable in octal than with
> > using the symbolic names." in the commit log would be good for those of
> > us who missed why this was added to checkpatch.
> >
> > Best regards
> > Uwe
> >
> >

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH] pwm: core: Use octal permission
  2020-11-17 17:54 [PATCH] pwm: core: Use octal permission Soham Biswas
  2020-11-17 18:12 ` Lee Jones
  2020-11-18 10:47 ` Soham Biswas
@ 2020-11-18 13:58 ` Soham Biswas
  2020-11-18 14:06   ` Soham Biswas
  2020-11-18 14:51 ` [PATCH v3] " Soham Biswas
  3 siblings, 1 reply; 25+ messages in thread
From: Soham Biswas @ 2020-11-18 13:58 UTC (permalink / raw)
  To: thierry.reding
  Cc: lee.jones, u.kleine-koenig, linux-pwm, linux-kernel, Soham Biswas

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


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-18 13:58 ` [PATCH] " Soham Biswas
@ 2020-11-18 14:06   ` Soham Biswas
  2020-11-18 14:21     ` Uwe Kleine-König
  0 siblings, 1 reply; 25+ messages in thread
From: Soham Biswas @ 2020-11-18 14:06 UTC (permalink / raw)
  To: thierry.reding; +Cc: Lee Jones, Uwe Kleine-König, linux-pwm, linux-kernel

On Wed, 18 Nov 2020 at 19:29, 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 -v3 to git-send-email but it didn't work it seems.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-18 14:06   ` Soham Biswas
@ 2020-11-18 14:21     ` Uwe Kleine-König
  2020-11-18 14:46       ` Lee Jones
  0 siblings, 1 reply; 25+ messages in thread
From: Uwe Kleine-König @ 2020-11-18 14:21 UTC (permalink / raw)
  To: Soham Biswas; +Cc: thierry.reding, Lee Jones, linux-pwm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1794 bytes --]

On Wed, Nov 18, 2020 at 07:36:28PM +0530, Soham Biswas wrote:
> On Wed, 18 Nov 2020 at 19:29, 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 -v3 to git-send-email but it didn't work it seems.

It only works if you use it with a commit range I guess, i.e. when it
calls git-format-patch itself.

Also I think if you call checkpatch on your own patch (e.g. using:

	git format-patch -v3 --stdout | scripts/checkpatch.pl

) it will tell you to break the long line in the commit log.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-18 14:21     ` Uwe Kleine-König
@ 2020-11-18 14:46       ` Lee Jones
  2020-11-18 16:56         ` Uwe Kleine-König
  0 siblings, 1 reply; 25+ messages in thread
From: Lee Jones @ 2020-11-18 14:46 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Soham Biswas, thierry.reding, linux-pwm, linux-kernel

On Wed, 18 Nov 2020, Uwe Kleine-König wrote:

> On Wed, Nov 18, 2020 at 07:36:28PM +0530, Soham Biswas wrote:
> > On Wed, 18 Nov 2020 at 19:29, 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;
> > >
> > 
> > I passed -v3 to git-send-email but it didn't work it seems.
> 
> It only works if you use it with a commit range I guess, i.e. when it
> calls git-format-patch itself.
> 
> Also I think if you call checkpatch on your own patch (e.g. using:
> 
> 	git format-patch -v3 --stdout | scripts/checkpatch.pl
> 
> ) it will tell you to break the long line in the commit log.

That's funny!  Although you can safely ignore that one.

I find it's better to keep errors/warnings whole.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH v3] pwm: core: Use octal permission
  2020-11-17 17:54 [PATCH] pwm: core: Use octal permission Soham Biswas
                   ` (2 preceding siblings ...)
  2020-11-18 13:58 ` [PATCH] " Soham Biswas
@ 2020-11-18 14:51 ` Soham Biswas
  2020-11-18 14:55   ` Soham Biswas
  2020-11-18 17:59   ` Thierry Reding
  3 siblings, 2 replies; 25+ messages in thread
From: Soham Biswas @ 2020-11-18 14:51 UTC (permalink / raw)
  To: thierry.reding
  Cc: lee.jones, u.kleine-koenig, linux-pwm, linux-kernel, Soham Biswas

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


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH v3] pwm: core: Use octal permission
  2020-11-18 14:51 ` [PATCH v3] " Soham Biswas
@ 2020-11-18 14:55   ` Soham Biswas
  2020-11-18 17:59   ` Thierry Reding
  1 sibling, 0 replies; 25+ messages in thread
From: Soham Biswas @ 2020-11-18 14:55 UTC (permalink / raw)
  To: thierry.reding; +Cc: Lee Jones, Uwe Kleine-König, linux-pwm, linux-kernel

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-18 14:46       ` Lee Jones
@ 2020-11-18 16:56         ` Uwe Kleine-König
  2020-11-18 17:39           ` Soham Biswas
  0 siblings, 1 reply; 25+ messages in thread
From: Uwe Kleine-König @ 2020-11-18 16:56 UTC (permalink / raw)
  To: Lee Jones; +Cc: Soham Biswas, thierry.reding, linux-pwm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2312 bytes --]

On Wed, Nov 18, 2020 at 02:46:54PM +0000, Lee Jones wrote:
> On Wed, 18 Nov 2020, Uwe Kleine-König wrote:
> 
> > On Wed, Nov 18, 2020 at 07:36:28PM +0530, Soham Biswas wrote:
> > > On Wed, 18 Nov 2020 at 19:29, 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;
> > > >
> > > 
> > > I passed -v3 to git-send-email but it didn't work it seems.
> > 
> > It only works if you use it with a commit range I guess, i.e. when it
> > calls git-format-patch itself.
> > 
> > Also I think if you call checkpatch on your own patch (e.g. using:
> > 
> > 	git format-patch -v3 --stdout | scripts/checkpatch.pl
> > 
> > ) it will tell you to break the long line in the commit log.
> 
> That's funny!  Although you can safely ignore that one.
> 
> I find it's better to keep errors/warnings whole.

Yes, so please don't ignore that warning for:

	Permission bits are easier readable in octal than with using the symbolic names.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] pwm: core: Use octal permission
  2020-11-18 16:56         ` Uwe Kleine-König
@ 2020-11-18 17:39           ` Soham Biswas
  0 siblings, 0 replies; 25+ messages in thread
From: Soham Biswas @ 2020-11-18 17:39 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Lee Jones, thierry.reding, linux-pwm, linux-kernel

On Wed, 18 Nov 2020 at 22:26, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> On Wed, Nov 18, 2020 at 02:46:54PM +0000, Lee Jones wrote:
> > On Wed, 18 Nov 2020, Uwe Kleine-König wrote:
> >
> > > On Wed, Nov 18, 2020 at 07:36:28PM +0530, Soham Biswas wrote:
> > > > On Wed, 18 Nov 2020 at 19:29, 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;
> > > > >
> > > >
> > > > I passed -v3 to git-send-email but it didn't work it seems.
> > >
> > > It only works if you use it with a commit range I guess, i.e. when it
> > > calls git-format-patch itself.
> > >
> > > Also I think if you call checkpatch on your own patch (e.g. using:
> > >
> > >     git format-patch -v3 --stdout | scripts/checkpatch.pl
> > >
> > > ) it will tell you to break the long line in the commit log.
> >
> > That's funny!  Although you can safely ignore that one.
> >
> > I find it's better to keep errors/warnings whole.
>
> Yes, so please don't ignore that warning for:
>
>         Permission bits are easier readable in octal than with using the symbolic names.
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | https://www.pengutronix.de/ |

I did fix that warning and ran the checkpatch script on my patch and
it said that there were no errors or style problems.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3] pwm: core: Use octal permission
  2020-11-18 14:51 ` [PATCH v3] " Soham Biswas
  2020-11-18 14:55   ` Soham Biswas
@ 2020-11-18 17:59   ` Thierry Reding
  2020-11-18 18:39     ` Soham Biswas
  2020-11-18 19:48     ` Uwe Kleine-König
  1 sibling, 2 replies; 25+ messages in thread
From: Thierry Reding @ 2020-11-18 17:59 UTC (permalink / raw)
  To: Soham Biswas; +Cc: lee.jones, u.kleine-koenig, linux-pwm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3] pwm: core: Use octal permission
  2020-11-18 17:59   ` Thierry Reding
@ 2020-11-18 18:39     ` Soham Biswas
  2020-11-18 19:48     ` Uwe Kleine-König
  1 sibling, 0 replies; 25+ messages in thread
From: Soham Biswas @ 2020-11-18 18:39 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Lee Jones, Uwe Kleine-König, linux-pwm, linux-kernel

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!

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3] pwm: core: Use octal permission
  2020-11-18 17:59   ` Thierry Reding
  2020-11-18 18:39     ` Soham Biswas
@ 2020-11-18 19:48     ` Uwe Kleine-König
  1 sibling, 0 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2020-11-18 19:48 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Soham Biswas, lee.jones, linux-pwm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]

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

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2020-11-18 19:48 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 17:54 [PATCH] pwm: core: Use octal permission Soham Biswas
2020-11-17 18:12 ` Lee Jones
2020-11-17 18:17   ` Soham Biswas
2020-11-17 18:21   ` Soham Biswas
2020-11-18  8:51     ` Lee Jones
2020-11-18  9:35       ` Uwe Kleine-König
2020-11-18  9:41         ` Joe Perches
2020-11-18  9:49           ` Lee Jones
2020-11-18  9:50           ` Uwe Kleine-König
2020-11-18 10:47 ` Soham Biswas
2020-11-18 12:43   ` [PATCH v2] " Uwe Kleine-König
2020-11-18 13:41     ` Soham Biswas
2020-11-18 13:48       ` Uwe Kleine-König
2020-11-18 13:49       ` Lee Jones
2020-11-18 13:58 ` [PATCH] " Soham Biswas
2020-11-18 14:06   ` Soham Biswas
2020-11-18 14:21     ` Uwe Kleine-König
2020-11-18 14:46       ` Lee Jones
2020-11-18 16:56         ` Uwe Kleine-König
2020-11-18 17:39           ` Soham Biswas
2020-11-18 14:51 ` [PATCH v3] " Soham Biswas
2020-11-18 14:55   ` Soham Biswas
2020-11-18 17:59   ` Thierry Reding
2020-11-18 18:39     ` Soham Biswas
2020-11-18 19:48     ` Uwe Kleine-König

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.