(adding Julia Lawall)
On Fri, 2017-02-03 at 20:44 -0800, Guenter Roeck wrote:
On Sat, Jan 28, 2017 at 07:05:09PM +1300, Derek Robson wrote:
A style fix across whole driver.
changed permissions to octal style, found using checkpatch
Signed-off-by: Derek Robson <robsonde@xxxxxxxxx>
FWIW, I think changes like this are best done using coccinelle.
I think checkpatch does it reasonably well.
Julia? Can coccinelle do this?
I believe cocinelle doesn't handle the substitution
and octal addition very well when multiple flags
are used.
That ensures that the results can be reproduced and are well defined.
As it is, someone will have to check each line of your patches to ensure
that the conversion is correct.
It would also ensure (hopefully) that we don't end up with constructs
such as
-#define USER_R (S_IFREG|S_IRUGO)
-#define USER_W (S_IFREG|S_IWUGO)
+#define USER_R (S_IFREG|0444)
+#define USER_W (S_IFREG|0666)
which really defeat the purpose of the whole exercise.
Why do you think mixing file specific attributes
with octal permissions is a bad thing?