Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-30 Thread Andy Shevchenko
On Sat, Apr 29, 2017 at 10:05 AM, Martin Kaiser wrote: > Thus wrote Andy Shevchenko (andy.shevche...@gmail.com): >> On Tue, Apr 18, 2017 at 12:11 PM, Martin Kaiser wrote: >> Aren't 0 and 0444 different by meaning? > > my undestanding is that proc_create()

Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-30 Thread Andy Shevchenko
On Sat, Apr 29, 2017 at 10:05 AM, Martin Kaiser wrote: > Thus wrote Andy Shevchenko (andy.shevche...@gmail.com): >> On Tue, Apr 18, 2017 at 12:11 PM, Martin Kaiser wrote: >> Aren't 0 and 0444 different by meaning? > > my undestanding is that proc_create() calls proc_create_data(), where > >

Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-29 Thread Martin Kaiser
Hello Andy, Thus wrote Andy Shevchenko (andy.shevche...@gmail.com): > On Tue, Apr 18, 2017 at 12:11 PM, Martin Kaiser wrote: > > checkpatch is asking for a 4 digit octal number. And at least for me, > > 0444 makes it clearer what the permissions actually are. Yes, somewhere >

Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-29 Thread Martin Kaiser
Hello Andy, Thus wrote Andy Shevchenko (andy.shevche...@gmail.com): > On Tue, Apr 18, 2017 at 12:11 PM, Martin Kaiser wrote: > > checkpatch is asking for a 4 digit octal number. And at least for me, > > 0444 makes it clearer what the permissions actually are. Yes, somewhere > > in the code, I

Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-18 Thread Martin Kaiser
Thus wrote Greg Kroah-Hartman (gre...@linuxfoundation.org): > > ERROR: Use 4 digit octal (0777) not decimal permissions > > #285: FILE: drivers/char/misc.c:285: > > + ret = proc_create("misc", 0, NULL, _proc_fops); > Come on now, think about what this is saying. Is 0 not also an octal >

Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-18 Thread Martin Kaiser
Thus wrote Greg Kroah-Hartman (gre...@linuxfoundation.org): > > ERROR: Use 4 digit octal (0777) not decimal permissions > > #285: FILE: drivers/char/misc.c:285: > > + ret = proc_create("misc", 0, NULL, _proc_fops); > Come on now, think about what this is saying. Is 0 not also an octal >

Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-18 Thread Greg Kroah-Hartman
On Tue, Apr 18, 2017 at 09:51:31AM +0200, Martin Kaiser wrote: > Thus wrote Greg Kroah-Hartman (gre...@linuxfoundation.org): > > > > - ret = proc_create("misc", 0, NULL, _proc_fops); > > > + ret = proc_create("misc", 0444, NULL, _proc_fops); > > > What checkpatch warning does this fix? 0 is a

Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-18 Thread Greg Kroah-Hartman
On Tue, Apr 18, 2017 at 09:51:31AM +0200, Martin Kaiser wrote: > Thus wrote Greg Kroah-Hartman (gre...@linuxfoundation.org): > > > > - ret = proc_create("misc", 0, NULL, _proc_fops); > > > + ret = proc_create("misc", 0444, NULL, _proc_fops); > > > What checkpatch warning does this fix? 0 is a

Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-18 Thread Martin Kaiser
Thus wrote Greg Kroah-Hartman (gre...@linuxfoundation.org): > > - ret = proc_create("misc", 0, NULL, _proc_fops); > > + ret = proc_create("misc", 0444, NULL, _proc_fops); > What checkpatch warning does this fix? 0 is a number :) ERROR: Use 4 digit octal (0777) not decimal permissions #285:

Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-18 Thread Martin Kaiser
Thus wrote Greg Kroah-Hartman (gre...@linuxfoundation.org): > > - ret = proc_create("misc", 0, NULL, _proc_fops); > > + ret = proc_create("misc", 0444, NULL, _proc_fops); > What checkpatch warning does this fix? 0 is a number :) ERROR: Use 4 digit octal (0777) not decimal permissions #285:

Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-17 Thread Greg Kroah-Hartman
On Mon, Apr 17, 2017 at 08:22:57PM +0200, Martin Kaiser wrote: > Set the permissions for /proc/misc to 0444 explicitly. At the moment, > we're using 0 and have proc_create_data() convert this to 0444. > This fixes a checkpatch warning. > > Signed-off-by: Martin Kaiser > --- >

Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-17 Thread Greg Kroah-Hartman
On Mon, Apr 17, 2017 at 08:22:57PM +0200, Martin Kaiser wrote: > Set the permissions for /proc/misc to 0444 explicitly. At the moment, > we're using 0 and have proc_create_data() convert this to 0444. > This fixes a checkpatch warning. > > Signed-off-by: Martin Kaiser > --- > v2: >separate

[PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-17 Thread Martin Kaiser
Set the permissions for /proc/misc to 0444 explicitly. At the moment, we're using 0 and have proc_create_data() convert this to 0444. This fixes a checkpatch warning. Signed-off-by: Martin Kaiser --- v2: separate patch for each checkpatch warning drivers/char/misc.c |2

[PATCH 2/2 v2] char: misc: use octal permissions for the proc entry

2017-04-17 Thread Martin Kaiser
Set the permissions for /proc/misc to 0444 explicitly. At the moment, we're using 0 and have proc_create_data() convert this to 0444. This fixes a checkpatch warning. Signed-off-by: Martin Kaiser --- v2: separate patch for each checkpatch warning drivers/char/misc.c |2 +- 1 file