lkml.org 
[lkml]   [2017]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry
On Tue, Apr 18, 2017 at 09:51:31AM +0200, Martin Kaiser wrote:
> Thus wrote Greg Kroah-Hartman (gregkh@linuxfoundation.org):
>
> > > - ret = proc_create("misc", 0, NULL, &misc_proc_fops);
> > > + ret = proc_create("misc", 0444, NULL, &misc_proc_fops);
>
> > What checkpatch warning does this fix? 0 is a number :)
>
> ERROR: Use 4 digit octal (0777) not decimal permissions
> #285: FILE: drivers/char/misc.c:285:
> + ret = proc_create("misc", 0, NULL, &misc_proc_fops);

Come on now, think about what this is saying. Is 0 not also an octal
number?

checkpatch requires you to use your brain, it is but a dumb perl
script...

greg k-h

\
 
 \ /
  Last update: 2017-04-18 10:17    [W:0.091 / U:3.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site