Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1625122

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

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry
Date 2017-04-18 10:20 +0200
Message-ID <txwwG-3Q5-15@gated-at.bofh.it> (permalink)
References <tfHJT-7FS-7@gated-at.bofh.it> <txjzs-42t-5@gated-at.bofh.it> <txjzs-42t-3@gated-at.bofh.it> <txt5M-1FB-3@gated-at.bofh.it> <txwdk-3uy-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2 v2] char: misc: use octal permissions for the proc entry Martin Kaiser <martin@kaiser.cx> - 2017-04-17 20:30 +0200
  Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc  entry Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-18 06:40 +0200
    Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc  entry Martin Kaiser <martin@kaiser.cx> - 2017-04-18 10:00 +0200
      Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc  entry Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-18 10:20 +0200
        Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc  entry Martin Kaiser <martin@kaiser.cx> - 2017-04-18 11:20 +0200

csiph-web