Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1625172
| From | Martin Kaiser <martin@kaiser.cx> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry |
| Date | 2017-04-18 11:20 +0200 |
| Message-ID | <txxsJ-4oB-13@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <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> <txwwG-3Q5-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Thus wrote Greg Kroah-Hartman (gregkh@linuxfoundation.org):
> > 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 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 can dig up that 0 is changed to 0444...
> checkpatch requires you to use your brain, it is but a dumb perl
> script...
Sorry, I won't be arguing on a personal level.
If you don't like the patch, feel free to reject it. No problem for me.
Do you think checkpatch shouldn't be looking for exactly 4 digits here
(and elsewhere, it has a list of functions with a permission parameter)?
Best regards,
Martin
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll 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