Discussion:
[Drbd-dev] [PATCH] block drivers/block: Use octal not symbolic permissions
Jens Axboe
2018-05-23 21:27:11 UTC
Permalink
Convert the S_<FOO> symbolic permissions to their octal equivalents as
using octal and not symbolic permissions is preferred by many as more
readable.
see: https://lkml.org/lkml/2016/8/2/1945
$ ./scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplace <files...>
o Wrapped modified multi-line calls to a single line where appropriate
o Realign modified multi-line calls to open parenthesis
Honestly, I see this as pretty needless churn.
--
Jens Axboe
Jens Axboe
2018-05-24 12:47:11 UTC
Permalink
Post by Jens Axboe
Convert the S_<FOO> symbolic permissions to their octal equivalents as
using octal and not symbolic permissions is preferred by many as more
readable.
see: https://lkml.org/lkml/2016/8/2/1945
$ ./scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplace <files...>
o Wrapped modified multi-line calls to a single line where appropriate
o Realign modified multi-line calls to open parenthesis
Honestly, I see this as pretty needless churn.
There is currently a mixture of symbolic and octal
permissions uses in block and drivers/block
ie: 94 octal and 146 symbolic uses.
If this is applied, all would become octal.
That does help justify the change. My main worry here is creating
unnecessary conflicts, which is always annoying. But it's even more
annoying when the change creating the conflict isn't really that
important at all. Case in point, the patch doesn't apply to the
for-4.18/block branch that it should go into...
--
Jens Axboe
Jens Axboe
2018-05-24 19:40:04 UTC
Permalink
Post by Jens Axboe
Post by Jens Axboe
Convert the S_<FOO> symbolic permissions to their octal equivalents as
using octal and not symbolic permissions is preferred by many as more
readable.
see: https://lkml.org/lkml/2016/8/2/1945
$ ./scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplace <files...>
o Wrapped modified multi-line calls to a single line where appropriate
o Realign modified multi-line calls to open parenthesis
Honestly, I see this as pretty needless churn.
There is currently a mixture of symbolic and octal
permissions uses in block and drivers/block
ie: 94 octal and 146 symbolic uses.
If this is applied, all would become octal.
That does help justify the change. My main worry here is creating
unnecessary conflicts, which is always annoying. But it's even more
annoying when the change creating the conflict isn't really that
important at all. Case in point, the patch doesn't apply to the
for-4.18/block branch that it should go into...
Done against most recent -next as it's basically impossible
to do anything against multiple private trees.
Also, the script that generated the patch is in the changelog
so it's simple to rerun.
Alright, applied, thanks.
--
Jens Axboe
Joe Perches
2018-05-23 21:41:30 UTC
Permalink
Post by Jens Axboe
Convert the S_<FOO> symbolic permissions to their octal equivalents as
using octal and not symbolic permissions is preferred by many as more
readable.
see: https://lkml.org/lkml/2016/8/2/1945
$ ./scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplace <files...>
o Wrapped modified multi-line calls to a single line where appropriate
o Realign modified multi-line calls to open parenthesis
Honestly, I see this as pretty needless churn.
It's just for consistency and the ability to highlight
somewhat unusual permissions uses like just 0400.

Apply it at your leisure or ignore it.

btw: Joshua Morris' email address is bouncing.
Maybe it should be removed from MAINTAINERS.
---
MAINTAINERS | 1 -
1 file changed, 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 9051a9ca24a2..0d546a10d0b9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5598,7 +5598,6 @@ F: drivers/base/firmware_loader/
F: include/linux/firmware.h

FLASH ADAPTER DRIVER (IBM Flash Adapter 900GB Full Height PCI Flash
Card)
-M: Joshua Morris <***@us.ibm.com>
M: Philip Kelleher <***@linux.vnet.ibm.com>
S: Maintained
F: drivers/block/rsxx/

Loading...